Confirmed users
1,396
edits
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= | <small>[[Accessibility |<< Back to Accessibility Home Page]]</small> | ||
= Propose = | |||
<div class="note">This documentation is out of date. You may want use new all-in-one [http://developer.mozilla.org/en/docs/Accessibility:AT-APIs documentation].</div> | |||
This FAQ explains how makers of Windows screen readers, voice dictation packages and magnification software can support Gecko-based software. The base of our support for these products is MSAA (Microsoft Active Accessibility), external readonly DOM support, and the keyboard API/user interface. | This FAQ explains how makers of Windows screen readers, voice dictation packages and magnification software can support Gecko-based software. The base of our support for these products is MSAA (Microsoft Active Accessibility), external readonly DOM support, and the keyboard API/user interface. | ||
= Definitions = | |||
Here are some basic definitions that you'll need for this document to make sense: | Here are some basic definitions that you'll need for this document to make sense: | ||
| Line 20: | Line 24: | ||
: please read the MSAA documentation on MSDN if you are unfamiliar with these. in general we abbreviate by removing redundant words. For example, we may say EVENT_ALERT instead of the full EVENT_SYSTEM_ALERT. | : please read the MSAA documentation on MSDN if you are unfamiliar with these. in general we abbreviate by removing redundant words. For example, we may say EVENT_ALERT instead of the full EVENT_SYSTEM_ALERT. | ||
== MSAA tree vs. DOM tree - what's the relation? == | |||
[[Image:at-windows-api-tree-relativity.gif|Diagram showing MSAA tree is a subset of the DOM tree]] | [[Image:at-windows-api-tree-relativity.gif|Diagram showing MSAA tree is a subset of the DOM tree]] | ||
| Line 28: | Line 32: | ||
Anything that is focusable or conveys important information about the structure of the document is exposed in the MSAA tree of IAccessibles. | Anything that is focusable or conveys important information about the structure of the document is exposed in the MSAA tree of IAccessibles. | ||
= Windows Applications Based on the Gecko Layout Engine = | |||
Gecko is a rendering engine that Mozilla, Netscape and other new browsers use. Gecko can render a variety of content, not just HTML and supports key web standards such as Cascading Style Sheets, Javascript and the W3C DOM. Gecko also handles the users keystrokes and mouse clicks. Gecko is the core architecture that we are adding accessibility to, in order to support basic accessibility in all applications that are based on it. | Gecko is a rendering engine that Mozilla, Netscape and other new browsers use. Gecko can render a variety of content, not just HTML and supports key web standards such as Cascading Style Sheets, Javascript and the W3C DOM. Gecko also handles the users keystrokes and mouse clicks. Gecko is the core architecture that we are adding accessibility to, in order to support basic accessibility in all applications that are based on it. | ||
== Embedded Clients (support MSAA) == | |||
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. | 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. | ||
| Line 39: | Line 43: | ||
* [http://kmeleon.sourceforge.net/ K-Meleon]<nowiki>: a light, ultra-fast and more advanced (fully configurable) Gecko-based web browser available on the Windows platform</nowiki> | * [http://kmeleon.sourceforge.net/ K-Meleon]<nowiki>: a light, ultra-fast and more advanced (fully configurable) Gecko-based web browser available on the Windows platform</nowiki> | ||
== XUL-Based Clients (support MSAA) == | |||
XUL-based clients make full use of the Gecko architecture, not only for HTML content, as well as for menus, dialogs and the entire user interface via an XML language called XUL (eXtensible User-interface Language). None of the user interface contains standard Windows controls -- not even the menus! This is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances). | XUL-based clients make full use of the Gecko architecture, not only for HTML content, as well as for menus, dialogs and the entire user interface via an XML language called XUL (eXtensible User-interface Language). None of the user interface contains standard Windows controls -- not even the menus! This is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances). | ||
| Line 47: | Line 51: | ||
* Mozilla Seamonkey (''please use 1.8 alpha builds or later'') | * Mozilla Seamonkey (''please use 1.8 alpha builds or later'') | ||
= How to Find the Content Window and Load the Document = | |||
Screen readers need to find the content window so that they know where to start grabbing the MSAA tree, in order to load the current document into a buffer in their own process. The content window always has the class MozillaContentWindowClass. | Screen readers need to find the content window so that they know where to start grabbing the MSAA tree, in order to load the current document into a buffer in their own process. The content window always has the class MozillaContentWindowClass. | ||
| Line 69: | Line 71: | ||
Gecko also helps determine when to load a new window by firing two EVENT_STATE_CHANGE's on the root ROLE_DOCUMENT accessible -- the first state change indicates the document pane is now busy loading. The second state change indicates the document pane has finished. When handling the event, use get_accState() to check the STATE_BUSY flag. When the document has finished loading the busy flag will be cleared. | Gecko also helps determine when to load a new window by firing two EVENT_STATE_CHANGE's on the root ROLE_DOCUMENT accessible -- the first state change indicates the document pane is now busy loading. The second state change indicates the document pane has finished. When handling the event, use get_accState() to check the STATE_BUSY flag. When the document has finished loading the busy flag will be cleared. | ||
= MSAA Support: IAccessible Methods = | |||
To use MSAA with Gecko, you'll need the tools and docs that come with the [http://www.microsoft.com/downloads/details.aspx?FamilyId=3755582A-A707-460A-BF21-1373316E13F0&displaylang=en Active Accessibility 2.0 SDK Tools]. The method <code>AccessibleObjectFromWindow()</code> will get you the root IAccessible corresponding to the top level window. Hold on to this root IAccessible, and use it to walk through the entire tree of IAccessible's. | To use MSAA with Gecko, you'll need the tools and docs that come with the [http://www.microsoft.com/downloads/details.aspx?FamilyId=3755582A-A707-460A-BF21-1373316E13F0&displaylang=en Active Accessibility 2.0 SDK Tools]. The method <code>AccessibleObjectFromWindow()</code> will get you the root IAccessible corresponding to the top level window. Hold on to this root IAccessible, and use it to walk through the entire tree of IAccessible's. | ||
| Line 96: | Line 94: | ||
* get_accKeyboardShortcut | * get_accKeyboardShortcut | ||
= MSAA Support: IAccessible Events and Unique ID's = | |||
== What MSAA events do we support? == | |||
* EVENT_FOCUS is fired for focus changes on any kind of focusable object | * EVENT_FOCUS is fired for focus changes on any kind of focusable object | ||
| Line 117: | Line 111: | ||
* EVENT_SELECTIONWITHIN is fired on multi selection containers when the current selection changes within. In addition, EVENT_SELECTIONADD and EVENT_SELECTIONREMOVE are fired on the the child who's selection changed. | * EVENT_SELECTIONWITHIN is fired on multi selection containers when the current selection changes within. In addition, EVENT_SELECTIONADD and EVENT_SELECTIONREMOVE are fired on the the child who's selection changed. | ||
== How to track where the event happened, within your own offscreen model == | |||
Ordinary zero-indexed child IDs are not practical for representing events. The problem is that the child ID system that is used by MSAA doesn't work well when you have a deep tree of objects in a window. It would be impractical to number all of the nodes in a document starting at 0, because whenever a node is inserted or removed it would be computationally very expensive to renumber things. So, the Firefox childID handed back from events is based on an algorithm that uses the pointer value of the related internal DOM node. This computed child ID for events is always a negative value, unique to the IAccessible firing the event | Ordinary zero-indexed child IDs are not practical for representing events. The problem is that the child ID system that is used by MSAA doesn't work well when you have a deep tree of objects in a window. It would be impractical to number all of the nodes in a document starting at 0, because whenever a node is inserted or removed it would be computationally very expensive to renumber things. So, the Firefox childID handed back from events is based on an algorithm that uses the pointer value of the related internal DOM node. This computed child ID for events is always a negative value, unique to the IAccessible firing the event | ||
| Line 127: | Line 119: | ||
Because screen readers usually cache an entire document's worth of data, it can be extremely useful for them to receive a child ID that helps them correlate back to a known object. We provide support for this technique via ISimpleDOMNode::get_nodeInfo(), which returns a uniqueID for any IAccessible that can be cached in the internal model. When an event is received, the negative childID should match one of these cached uniqueID's, if the entire document has been stored and kept current. Keeping an internal cache current means getting new subtrees of IAccessibles whenever an EVENT_REORDER is received, indicating important changes have invalidated part of the model. | Because screen readers usually cache an entire document's worth of data, it can be extremely useful for them to receive a child ID that helps them correlate back to a known object. We provide support for this technique via ISimpleDOMNode::get_nodeInfo(), which returns a uniqueID for any IAccessible that can be cached in the internal model. When an event is received, the negative childID should match one of these cached uniqueID's, if the entire document has been stored and kept current. Keeping an internal cache current means getting new subtrees of IAccessibles whenever an EVENT_REORDER is received, indicating important changes have invalidated part of the model. | ||
= MSAA Features We Do Not Support = | |||
<div class="indent"> | <div class="indent"> | ||
| Line 150: | Line 140: | ||
</div> | </div> | ||
= Intentional Differences with Internet Explorer = | |||
<div class="indent"> | <div class="indent"> | ||
| Line 156: | Line 146: | ||
For the most part, where we support an MSAA feature, we have tried to duplicate Internet Explorer's use of it. Please let us know if you find any differences not listed here: | For the most part, where we support an MSAA feature, we have tried to duplicate Internet Explorer's use of it. Please let us know if you find any differences not listed here: | ||
== Accessible Relations are Supported == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 194: | Line 184: | ||
</div> | </div> | ||
== Checkable, Required and Invalid States are Supported == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 212: | Line 202: | ||
</div> | </div> | ||
== Document Structure Exposed in MSAA Tree == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 227: | Line 217: | ||
</div> | </div> | ||
== Positional Descriptions are Supported == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 243: | Line 233: | ||
</div> | </div> | ||
== DHTML Accessibility is Supported == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 251: | Line 241: | ||
</div> | </div> | ||
== IAccessibles Persist == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 259: | Line 249: | ||
</div> | </div> | ||
== Page Loading is Tracked via STATE_CHANGE events == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 269: | Line 259: | ||
</div> </div> | </div> </div> | ||
= MSAA Role Support = | |||
{| class="standard-table" | | {| class="standard-table" | | ||
| Line 576: | Line 566: | ||
| DHTML: role="wairole:checkbox" | | DHTML: role="wairole:checkbox" | ||
|- | |- | ||
| XForms: <item/> of full <select/> | | XForms: <nowiki><item/> of full <select/></nowiki> <br/> <nowiki> <input/> of boolean type</nowiki> | ||
|- | |- | ||
| rowspan="4" | ROLE_RADIOBUTTON | | rowspan="4" | ROLE_RADIOBUTTON | ||
| Line 680: | Line 670: | ||
|} | |} | ||
= Enhancing Performance on the Client End via IEnumVARIANT = | |||
<div class="indent"> | <div class="indent"> | ||
| Line 690: | Line 680: | ||
</div> | </div> | ||
= Avoiding Memory Leaks = | |||
<div class="indent"> | <div class="indent"> | ||
| Line 700: | Line 690: | ||
</div> | </div> | ||
= Additional DOM Support = | |||
<div class="indent"> | <div class="indent"> | ||
| Line 712: | Line 702: | ||
* ISimpleDOMDocument contains basic document information, such title, URL, doctype and mime type. | * ISimpleDOMDocument contains basic document information, such title, URL, doctype and mime type. | ||
== Compiling the .idl Files == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 724: | Line 714: | ||
</div> | </div> | ||
== ISimpleDOMNode == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 838: | Line 828: | ||
</div> </div> | </div> </div> | ||
== ISimpleDOMText == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 876: | Line 866: | ||
</pre> | </pre> | ||
== ISimpleDOMDocument == | |||
<div class="indent"> | <div class="indent"> | ||
| Line 906: | Line 896: | ||
</pre> | </pre> | ||
= Keyboard User Interface and API = | |||
<div class="indent"> | <div class="indent"> | ||
| Line 916: | Line 906: | ||
</div> | </div> | ||
= Beyond HTML: Other Types of Web Content = | |||
* You may have heard of some content types beyond HTML, and want to know if Gecko based products will support them: | * You may have heard of some content types beyond HTML, and want to know if Gecko based products will support them: | ||
| Line 925: | Line 915: | ||
* [http://www.xulplanet.com/ XUL]<nowiki>: The XML-based language used by Firefox and Mozilla to develop the UI. Similar to HTML in that it can be combined with CSS and Javascript to make powerful applications. Contains more desktop-style widgets than HTML and follows a box layout model, rather than being text-flow based. In the future more standalone applications will use XUL via </nowiki>[http://wiki.mozilla.org/XUL:Xul_Runner XULRunner]. | * [http://www.xulplanet.com/ XUL]<nowiki>: The XML-based language used by Firefox and Mozilla to develop the UI. Similar to HTML in that it can be combined with CSS and Javascript to make powerful applications. Contains more desktop-style widgets than HTML and follows a box layout model, rather than being text-flow based. In the future more standalone applications will use XUL via </nowiki>[http://wiki.mozilla.org/XUL:Xul_Runner XULRunner]. | ||
= Questions or Comments? = | |||
<div class="indent"> | <div class="indent"> | ||