spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / mozilla / 1 To page 1To page 2current pageTo page 4To page 5To page 6To page 7
[previous] [next]

Content Coordinator
Aquent
US-WA-Redmond

Justtechjobs.com Post A Job | Post A Resume
Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

Rapid Application Development with Mozilla: Navigation. Pt. 1

This hierarchical aspect of the focus ring is meant for the user’s benefit, but it is also used by Mozilla’s command system, described in Chapter 9, Commands. There, the commandDispatcher.getControllerForCommand() method scans up through the focus ring hierarchy looking for a usable controller.

Most focusable XUL tags have focus() and/or blur() methods for scripts to use. Until very recently, the focus ring has had some subtle bugs. These issues occasionally confuse the state of XUL windows. With version 1.4, the focus ring is now quite reliable.

8.1.2.1 Hyperlinks. When Mozilla displays HTML pages, any hyperlinks on the page are included in the focus ring. XUL has no hyperlinks. If XUL and HTML share the same document (via use of xmlns attributes), then XUL tags and HTML hyperlinks can coexist in the one focus ring.

8.1.3 The Menu System

A navigation system separate from the focus ring is Mozilla’s menu system. This system is initiated by pressing the Alt key (or Control or Meta on older UNIX systems) or by hovering over or clicking an item on the menu bar.

The menu navigation system is not just a series of <key> tags. It is a fundamental part of the platform’s support for XUL. For the menu system to be enabled, the XUL document displayed must contain a <menubar> tag. Only menus in the menu bar can be navigated to using this system.

Individual items in the menu system may also be accessed directly, separate from the menu system. To do this, just decorate the menu items with keys. That process is described in Chapter 6, Events. Support for specific tags is noted in this chapter.

8.1.4 Accessibility

Accessibility is a feature of software designed to make it usable for those with disabilities. Mozilla has accessibility support on Microsoft Windows and Macintosh, and its UNIX/Linux version will have it when support for the GTK2 libraries is complete.
All XUL widgets contributing to the focus ring and to the menu system can be made accessible. HTML form elements and links can also be made accessible. Form elements are of particular interest because governments want to provide services that disabled citizens can access over the Internet.

Accessibility support can be implemented a number of ways. The simplest way involves no programming at all. Various devices and software utilities that can magnify a visual display until it is readable exist; other devices are easier-to-handle substitutes for traditional keyboards and mice.

At the other extreme, a complex solution is to provide an API and let other programmers hook their accessibility software and devices into it.

Mozilla provides such an API in the form of many XPCOM interfaces, all prefixed with nsIAccessible. Use of these interfaces is nearly, but not quite, an embedded use of the Mozilla Platform. These interfaces are not recommended for applications where the users are able.

Between these extremes is a solution that uses simple XML markup techniques. This solution consists of CSS2 @media style declarations, the XHTML and XUL accesskey attribute, and the XUL <label> tag. @media and accesskey are well documented in the relevant standards—accesskey works the same for XUL as it does for HTML.

At a technical level, these features must be implemented so that they use the accessibility features of the underlying GUI toolkit. If this is done, the problem of expressing the content to the user is the GUI toolkit’s problem, not the application’s problem. This is how Mozilla works. The nsIAccessible interfaces expose information from the XML document to the GUI toolkit.

In all discussion to date, the XUL <label> tag has appeared identical to the <description> tag, except that it can be reduced to a label attribute. The <label> tag first differs from the description tag in the area of accessibility. The <label> tag provides the alternate content that is needed for an accessibility system.

If a form element has a label attribute, Mozilla will present its content both to the screen and to the GUI toolkit as guide information that should be expressed to the user. Expressed to the user might mean that the guide information is spoken by the computer.

If a form element doesn’t have such an attribute, then Mozilla will look for a child tag that is a <label> tag and use that. If no suitable child tag exists, it will look for a <label> tag whose id matches the id stated in the form tag’s control attribute. If that isn’t found, then there is no accessibility information to supply.

Mozilla has accessibility support for all the simple XUL form elements. The <menuitem>, <menulist>, and <tab> tags also have accessibility support. Accessibility support is connected to XUL tags in the XBL bindings for each such tag.


home / programming / mozilla / 1 To page 1To page 2current pageTo page 4To page 5To page 6To page 7
[previous] [next]

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Working with the DOM Stylesheets Collection · Administering RBAC in PHP 5 CMS Framework · xref: Automatic Cross Referencing Script
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Combine BottomCount() with Other MDX Functions to Add Sophistication · Creating a Daemon with Python · The Coming Voice-over-WiMAX Revolution

Created: March 27, 2003
Revised: December 19, 2003

URL: http://webreference.com/programming/mozilla/1