This documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support Gecko-based software. We provide for them the support of these products on Windows, Linux/Unix and OS X platforms.
Here are some basic definitions that you'll need for this document to make sense.
AT APIs terms
- Microsoft Active Accessibility (MSAA)
- an API devised by Microsoft so that accessibility aids can track what's going on inside the user interface of any software package that supports it. If you seriously need to understand MSAA, you'll need to read the docs on MSDN and play with the sample apps and code that come with MSAA SDK 1.3. (I recommend SDK 1.3 because the MSAA SDK 2.0 doesn't come with the source code to the testing tools. The other differences are not important).
- IAccessible2 (IA2)
- IAccessible2 is a new accessibility API which complements Microsoft's earlier work on MSAA. This API fills critical accessibility API gaps in the MSAA offering.
- Assistive Technology Service Provider Interface (AT-SPI)
- an API devised by Sun Microsystems so that accessibility aids can track what's going on inside the user interface of any software package that supports it. If you seriously need to understand AT-SPI, you'll need to read the docs on gnome.org and play with the available sample apps and code, such as at-poke. Please note that the web docs are sometimes out of date, and the latest AT-SPI is available on CVS.
- Universal Access (UA)
- Universal Access (UA) is the Apple's accessibility framework.
Gecko related terms
- The rendering engine for Firefox, Thunderbird, Nvu, Mozilla Seamonkey and other applications. Gecko is the internal engine that Mozilla uses to render any kind of web content. It supports HTML, XHTML, Cascading Style Sheets (CSS), the Document Object Model (DOM) and many more.
- Originally ARIA was designed to bring accessibility into dynamic web pages, to provide markup to add make accessible custom DHML widgets. But actually ARIA usage area isn't restricted by HTML, for example, in Gecko it is used in XUL as well. Strongly speaking ARIA specification provides an ontology of roles, states, and properties that set out an abstract model for accessible interfaces and can be used to improve the accessibility and interoperability of Web Content and Applications. This information is mapped to accessibility frameworks that use this information to provide alternative access solutions.
- DOM: Document Object Model
- XUL: eXtensible User-interface Language
- AJAX is a method of building interactive web applications that process user requests, user actions immediately in real time, unlike an HTTP request, during which users must wait for a whole page to reload or for a new page to load. Data is therefore stored and retrieved dynamically much faster.
Here you will find some basics about Gecko and Gecko based softwares and how accessibility is supported for web specifications in Gecko.
- MathML: an XML dialect used to display full math notation on web pages. Here's the ongoing Mozilla project to support MathML . We do not currently have plans to support MSAA for MathML - we will likely suggest use of the external DOM for this, because MSAA simply does not have the right semantics in it to support mathematics. MathML support is currently built into Firefox.
- SVG : Scalable Vector Graphics. Essentially W3C's XML-based version of Flash - mixes well with other markup based content, supports the DOM and has accessibility features. Mozilla's SVG Project has been through several stalls and rebirths -- SVG will probably become more of a priority if other well known browsers support it. We will not know how, or whether, we will support SVG accessibility until a better implementation comes along. Firefox 1.5 supports SVG. Potentially it can make use of the same namespaced role and state attributes as DHTML accessibility, but it may require more powerful author-definable relationships.
- XForms: XForms is the future of online forms as envisioned by the W3C. Drawing on other W3C standards like XML Schema, XPath, and XML Events, XForms tries to address some of the limitations with the current HTML forms model. One of the key features of XForms is accessibility. XForms accessibility development is currently being developed for Mozilla 1.9 (Firefox 3) by Alexander Surkov.
Gecko Based Applications
Gecko can be used in two ways to create application:
Embedded clients use Gecko only in the content window, at the moment for HTML and generic XML only. They typically use standard Windows controls for their user interface -- the area outside of the client content window, plus the context menu.
- on Windows platform
- MFCEMBED testing client - this is a very simple package, great for testing basic HTML accessibility with your products and the Gecko rendering engine (please contact us for a copy).
- K-Meleon - light, ultra-fast and more advanced (fully configurable) Gecko-based web browser available on the Windows platform
- on Linux/Unix platform
- on Mac platform
- Camino - web browser for OS X
XUL applications make full use of the Gecko architecture, not only for HTML content, but also for the entire user interface. Widgets such as menus, tab panels, tree views and dialogs are provided via an XML language called XUL (eXtensible User-interface Language). None of the user interface contains standard OS controls. This is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances). Developing a XUL window is not that different from developing a web page, but the elements available to add widgets are more powerful and designed to be similar to desktop widgets.
Examples of XUL applications:
- Firefox - web-browser
- Thunderbird - email client
- Seamonkey - web-browser, advanced e-mail and newsgroup client, IRC chat client, and HTML editing made simple
- Sunbird - cross-platform calendar application
- KompoZer - a complete Web Authoring System for Linux Desktop, Microsoft Windows and Macintosh users to rival programs like FrontPage and Dreamweaver.
- Open Komodo - platform for building developer environments
- Miro - a free, open source internet tv and video player
- Any XulRunner application (Songbird media player, etc.)
- Extensions to other XUL apps (e.g. Firefox extensions)
For Firefox and all other Gecko-based products: this documentation only applies to up-to-date product builds based on Gecko 1.9 -- currently not available on official releases. Grab the current build of Firefox or any other Gecko-based product which supports these features:
Accessible tree vs. DOM tree - what's the relation?
The accessible tree and the DOM tree are parallel structures. Accessible objects are created in the accessible tree for every DOM element that should be exposed to AT. Roughly speaking the accessible tree is a subset of the DOM tree. The following rules are applied to define whether DOM element is exposed to AT.
- Is focusable
- Is formatted with a blank line before and after (display:block in web jargon)
- Conveys important information about the structure of the document, such as a heading
- Contains a value that can change
- Uses a dynamic content role attribute that is not equal to "presentation"
- Uses one of the universal dynamic content property attributes, which are currently:
- Is pointed to by another element with an ARIA relation (aria-controls, aria-describedby, aria-flowto, aria-labelledby or aria-owns)
- Uses an onclick handler
- Is in list of accessible elements in the role table
Supported AT APIs
We support MSAA (Microsoft Active Accessibility) and IAccessible2 on Windows. Also we expose own MS COM interfaces to provide an access to DOM tree. You can refer to the original Windows accessibility API page for information about the MSAA and DOM support.
IAccessible2 is a set of interfaces that overlay the MSAA (IAccessible) and DOM (ISimpleDOM*) interface support. Any object that supports IAccessible will also support IAccessible2 and possibly any of the other IA2 interfaces.
We support ATK/AT-SPI. For more information refer to the AT-SPI support page.
We currently support only a subset of Universal Access. The rest of the Mozilla Universal Access support is in progress.
How to Find the Content Window and Load the Document
In XUL-based clients, screen readers may need to find the content window so that they know where to start grabbing the accessible tree, in order to load the current document into a buffer in their own process. Refer to specific pages for interested AT API.
Determining if Accessibility is Enabled in a Firefox
AT APIs Supported Features Details
Refer to specific pages to get information of supported interfaces for interested AT API:
- Core: Gecko interfaces
- Windows: MSAA, IA2, IEnumVARIANT, ISimpleDOMNode, ISimpleDOMText and ISimpleDOMDocument
- Linux: AT-SPI
Refer to specific pages to get information of supported roles for interested AT API:
Refer to specific pages to get information of supported states for interested AT API:
Refer to specific pages to get information of supported relations for interested AT API:
Supported Object Attributes
Refer to specific pages to get information of supported object attributes for interested AT API:
Supported Text Attributes
Refer to specific pages to get information of supported text attributes for interested AT API:
Supported Document Attributes
Refer to specific pages to get information of supported document attributes for interested AT API:
- Gecko/MSAA/IA2 - document attributes are not exposed. Instead, the same information is available via the ISimpleDOMDocument interface.
Refer to specific pages to get information of supported events for interested AT API:
AT APIs Unsupported Features
We do not support some AT APIs features. Please refer to pages below for interesting AT API:
Differences With Other Applications
- AT-SPI - XXX: to be done
Avoiding Memory Leaks
It is the assistive technology's responsibility to watch for events that indicate when windows or content subtrees are being destroyed, and to release all Accessible objects related to that window. In addition, STATE_DEFUNCT is set on objects that should be released by the assistive technology. Mutation events should be watched to invalidate the cache.
- Under MSAA/IA2, watch for EVENT_HIDE
- Under ATK/AT-SPI, watch for children-changed:remove
To help developers in that regard, there is Memory Leak monitor, a Firefox extension.
Keyboard User Interface and API
Fortunately, Gecko uses the standard keyboard API's for each supported platform. The Mozilla keyboard shortcuts for content are similar to what is used in other browsers. Here is a list of Firefox keyboard shortcuts.
Here you will find a list of tools to test accessibility Gecko-based applications.
- MSAA SDK tools - version 1.3 is recommended instead of 2.0 because it includes source code for the tools
- Accessibility Probe -- includes MSAA support as well
- Accerciser - interactive Python accessibility explorer for the GNOME desktop
- DOM Inspector has an ability to test Gecko accessibility layer, supports base features.