Accessibility/XForms: Difference between revisions
GavinSharp (talk | contribs) m (Reverted edits by Firefoxer2011 (Talk) to last revision by Surkov.alexander) |
|||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
#REDIRECT [[MDC:Accessibility:XForms]] | |||
<small>[[Accessibility |<< Back to Accessibility Home Page]]</small> | <small>[[Accessibility |<< Back to Accessibility Home Page]]</small> | ||
== | = Intoduction = | ||
Assistive technologies API for XForms is supported starting from Firefox 3 (Gecko 1.9). Implementation of accessible objects for XForms elements is based on top | |||
of the existing object hierarchy introduced in the Mozilla accessibility module. XForms elements behavior is implemented in accordance with [http://www.mozilla.org/access/toolkit-checklist accessible toolkit checklist]. This article provides a short documentation how accessibility is handled in Gecko for XForms. | |||
= Get Build = | |||
Subsections below explain how you can obtain accessible XForms-enabled build. These are either downloading latest build of firefox or building it yourself. | |||
== Downloading Builds == | |||
For Firefox, you may directly download the nighly "trunk" build of | |||
Firefox and install the XForms extension | |||
which lives in 'xpi' directory of the build. Note, XForms accessibility | |||
is implemented only on trunk. | |||
Trunk builds are not considered stable and should not be installed on | |||
top of the Firefox used for daily browsing. | |||
Currently we have verified that XForms accessibility is working on the | |||
Windows platform, and Linux testing has not yet been done, although | |||
everything should work and is ready to be tested. | |||
You will find trunk builds of Firefox at [http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ ftp.mozilla.org], trunk builds of XForms extension (Windows) at [http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/windows-xpi/ ftp.mozilla.org] or trunk builds of XForms extension (Linux) [http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/linux-xpi/ ftp.mozilla.org]. | |||
== Build It Yourself == | |||
If you would like to build firefox/seamonkey yourself then please ensure | |||
your config file has | |||
the following option "ac_add_options | |||
--enable-extensions=default,xforms,schema-validation". | |||
= How To Test = | |||
There are two approaches to test XForms accessibility. The first is to use | |||
and assistive technology such as a screen reader, or an accessibility | |||
testing tool, to make sure XForms elements have proper accessible objects. Or | |||
you may be guided by [http://www.mozilla.org/access/toolkit-checklist toolkit checklist] to check keyboard navigation for XForms controls. | |||
You can try the following link to test XForms accessibility: | |||
* visual XForms elements in XHTML document at [https://bugzilla.mozilla.org/attachment.cgi?id=251493 bugzilla.mozilla.org] | |||
* visual XForms elements in XUL document at [https://bugzilla.mozilla.org/attachment.cgi?id=251497 bugzilla.mozilla.org] | |||
* you can see XForms sample tests at [http://www.mozilla.org/projects/xforms/samples.html Mozilla XForms project] | |||
* there are set of tests at [http://beaufour.dk/xftst/ beaufour.dk] | |||
* W3C's XForms test at [http://www.w3.org/MarkUp/Forms/Test/XForms1.0/Edition2/front_html/XF102edTestSuite.html w3.org] | |||
== Accessibility properties == | = Keyboard Navigation Issue = | ||
== Navigation Sequence == | |||
Though XForms spec declares <code>navindex</code> attribute to define the navigation sequence (see [http://www.w3.org/TR/xforms/slice8.html#attrs-ui-common 1.0 specs] or [http://www.w3.org/TR/xforms11/#attrs-ui-common 1.1 specs]) but Rich Schwerdtfeger (<small>Distinguished Engineer, SWG Accessibility Architect/Strategist Chair, IBM Accessibility Architecture Review Board</small>) gave some clarification about <code>navindex</code>. He wrote: | |||
<blockquote>Navindex was in XForms - it was stripped out as it was believed the focus model was dependent on the content which used it. So, yes we don't care about navindex in XForms. If you use xhtml1.x use tabindex. If you use Xhtml2 use nextfocus.</blockquote> Therefore since Mozilla XForms works in XHTML (1.x) or XUL documents only then we use <code>tabindex</code> instead. Note, we support <code>-moz-user-focus</code> style neither for XHTML or XUL. | |||
= AT API = | |||
== Accessible properties == | |||
This section describes common rules how accessibility properties are formed for forms control elements. | This section describes common rules how accessibility properties are formed for forms control elements. | ||
Line 25: | Line 74: | ||
* invalid - STATE_INVALID | * invalid - STATE_INVALID | ||
* out of range - STATE_INVALID | * out of range - STATE_INVALID | ||
=== attributes === | |||
Redefines <code>[http://www.w3.org/TR/aria-state/#datatype datatype]</code> ARIA attribute. Its value is XML Schema [http://www.w3.org/TR/xmlschema-2/#built-in-datatypes builit-in datatype] of instance node that XForms element is bound to. | |||
=== children === | === children === | ||
Line 57: | Line 109: | ||
Serves to show instance data that the element is bound to (see the [http://www.w3.org/TR/xforms/slice8.html#ui-output spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Output docs]). It can have the following presentations: | Serves to show instance data that the element is bound to (see the [http://www.w3.org/TR/xforms/slice8.html#ui-output spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Output docs]). It can have the following presentations: | ||
* text | * [[Accessibility/XForms:Text|text]] | ||
* calendar | * [[Accessibility/XForms:Calendar|calendar]] | ||
=== upload === | === upload === | ||
Provides a means for the user to select a file (see the [http://www.w3.org/TR/xforms/slice8.html#ui-upload spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Upload docs]). | Provides a means for the user to select a file (see the [http://www.w3.org/TR/xforms/slice8.html#ui-upload spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Upload docs]). This element is represented by [[Accessibility/XForms:Upload|upload]]. | ||
=== range === | === range === | ||
Allows the user to choose a value from within a specific range of values (see the [http://www.w3.org/TR/xforms/slice8.html#ui-range spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Range docs]). Currently it is represented by a slider only. | Allows the user to choose a value from within a specific range of values (see the [http://www.w3.org/TR/xforms/slice8.html#ui-range spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Range docs]). Currently it is represented by a [[Accessibility/XForms:Slider|slider]] only. | ||
=== trigger === | === trigger === | ||
Line 74: | Line 126: | ||
=== submit === | === submit === | ||
Invokes the submission of the selected instance data to its target destination (see the [http://www.w3.org/TR/xforms/slice8.html#ui-submit spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Submit docs]). | Invokes the submission of the selected instance data to its target destination (see the [http://www.w3.org/TR/xforms/slice8.html#ui-submit spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Submit docs]). This element is represented by [[Accessibility/XForms:Button|button]]. | ||
=== select === | === select === | ||
Line 83: | Line 132: | ||
Allows the user to choose one or multiple values from a list of pre-defined values (see the [http://www.w3.org/TR/xforms/slice8.html#ui-selectMany spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Select docs]). It can have the following representations: | Allows the user to choose one or multiple values from a list of pre-defined values (see the [http://www.w3.org/TR/xforms/slice8.html#ui-selectMany spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Select docs]). It can have the following representations: | ||
* listbox | * [[Accessibility/XForms:Listbox|listbox]] | ||
* | * [[Accessibility/XForms:Checkgroup|checkboxes group]] | ||
=== select1 === | === select1 === | ||
Line 90: | Line 139: | ||
Allows the user to choose a single value from a list of pre-defined values (see the [http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-label spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Select1 docs]). It can have the following representations: | Allows the user to choose a single value from a list of pre-defined values (see the [http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-label spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Select1 docs]). It can have the following representations: | ||
* combobox | * [[Accessibility/XForms:Combobox|combobox]] | ||
* listbox | * [[Accessibility/XForms:Listbox|listbox]] | ||
* radio group | * [[Accessibility/XForms:Radiogroup|radio group]] | ||
== Additional Elements == | == Additional Elements == | ||
Line 117: | Line 166: | ||
Used in combination with event listeners to display a message to the user when the specified event occurs (see the [http://www.w3.org/TR/xforms/slice10.html#action-info spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Message docs]). The <code>message</code> element has <code>alert</code> role. | Used in combination with event listeners to display a message to the user when the specified event occurs (see the [http://www.w3.org/TR/xforms/slice10.html#action-info spec], the [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements:Message docs]). The <code>message</code> element has <code>alert</code> role. | ||
= Resources = | |||
Below you will find a list of XForms/Accessiblity resources: | |||
* Mozilla accessibility project at [http://www.mozilla.org/access/ mozilla.org] | |||
* XForms specification at [http://www.w3.org/TR/xforms/ w3.org] | |||
* Mozilla XForms project at [http://www.mozilla.org/projects/xforms/ mozilla.org] | |||
* UI XForms elements references at [http://developer.mozilla.org/en/docs/XForms:User_Interface_Elements devmo] |
Latest revision as of 21:53, 13 May 2010
Redirect to:
<< Back to Accessibility Home Page
Intoduction
Assistive technologies API for XForms is supported starting from Firefox 3 (Gecko 1.9). Implementation of accessible objects for XForms elements is based on top of the existing object hierarchy introduced in the Mozilla accessibility module. XForms elements behavior is implemented in accordance with accessible toolkit checklist. This article provides a short documentation how accessibility is handled in Gecko for XForms.
Get Build
Subsections below explain how you can obtain accessible XForms-enabled build. These are either downloading latest build of firefox or building it yourself.
Downloading Builds
For Firefox, you may directly download the nighly "trunk" build of Firefox and install the XForms extension which lives in 'xpi' directory of the build. Note, XForms accessibility is implemented only on trunk. Trunk builds are not considered stable and should not be installed on top of the Firefox used for daily browsing. Currently we have verified that XForms accessibility is working on the Windows platform, and Linux testing has not yet been done, although everything should work and is ready to be tested. You will find trunk builds of Firefox at ftp.mozilla.org, trunk builds of XForms extension (Windows) at ftp.mozilla.org or trunk builds of XForms extension (Linux) ftp.mozilla.org.
Build It Yourself
If you would like to build firefox/seamonkey yourself then please ensure your config file has the following option "ac_add_options --enable-extensions=default,xforms,schema-validation".
How To Test
There are two approaches to test XForms accessibility. The first is to use and assistive technology such as a screen reader, or an accessibility testing tool, to make sure XForms elements have proper accessible objects. Or you may be guided by toolkit checklist to check keyboard navigation for XForms controls.
You can try the following link to test XForms accessibility:
- visual XForms elements in XHTML document at bugzilla.mozilla.org
- visual XForms elements in XUL document at bugzilla.mozilla.org
- you can see XForms sample tests at Mozilla XForms project
- there are set of tests at beaufour.dk
- W3C's XForms test at w3.org
Though XForms spec declares navindex
attribute to define the navigation sequence (see 1.0 specs or 1.1 specs) but Rich Schwerdtfeger (Distinguished Engineer, SWG Accessibility Architect/Strategist Chair, IBM Accessibility Architecture Review Board) gave some clarification about navindex
. He wrote:
Navindex was in XForms - it was stripped out as it was believed the focus model was dependent on the content which used it. So, yes we don't care about navindex in XForms. If you use xhtml1.x use tabindex. If you use Xhtml2 use nextfocus.
Therefore since Mozilla XForms works in XHTML (1.x) or XUL documents only then we use tabindex
instead. Note, we support -moz-user-focus
style neither for XHTML or XUL.
AT API
Accessible properties
This section describes common rules how accessibility properties are formed for forms control elements.
name
It is formed from value of child XForms label
element if the element doesn't have labelledby
attribute.
description
It is formed from value of child XForms hint
element if the element doesn't have describedby
attribute.
state
It is formed as well from model item properties (MIPs) of instance node that XForms element is bound to as from valid/invalid or in-range/out-of-range states of instance node. Instance node states are mapped to accessibility state constants declared in nsIAccessible like it shown below:
- relevant - STATE_UNAVAILABLE
- readonly - STATE_READONLY
- required - STATE_REQUIRED
- invalid - STATE_INVALID
- out of range - STATE_INVALID
attributes
Redefines datatype
ARIA attribute. Its value is XML Schema builit-in datatype of instance node that XForms element is bound to.
children
Mozilla XForms implementation allows form control elements to have child elements. Therefore accessible children are formed from any accessible child elements of form control element and from elements that are introduced by its presentation.
Forms Controls Module
Some of form control elements may be represented in few ways by different widgets. This section lists accessible presentations for form control elements.
input
A key xforms element to show and change the instance data to which it is bound (see the spec, the docs). The follwoing representations input
element are accessible:
- text field - see the docs.
- checkbox - see the docs
- datepicker - see the docs.
- calendar - see the docs.
- days list - see the docs.
- months list - see the docs.
secret
Used for inputting passwords (see the spec, the docs). This element is represented by password field.
textarea
Serves to show/change multiline text (see the spec, the docs). This element is represented by multiline text field.
output
Serves to show instance data that the element is bound to (see the spec, the docs). It can have the following presentations:
upload
Provides a means for the user to select a file (see the spec, the docs). This element is represented by upload.
range
Allows the user to choose a value from within a specific range of values (see the spec, the docs). Currently it is represented by a slider only.
trigger
Allows the user to initiate actions (see the spec, the docs). This element is represented by button.
submit
Invokes the submission of the selected instance data to its target destination (see the spec, the docs). This element is represented by button.
select
Allows the user to choose one or multiple values from a list of pre-defined values (see the spec, the docs). It can have the following representations:
select1
Allows the user to choose a single value from a list of pre-defined values (see the spec, the docs). It can have the following representations:
Additional Elements
These elements may be used as child elements to the form controls described above. Some of these elements are not accessible itself but they makes accessibility properties for XForms elements that hold them.
label
Specifies the label for the xforms control (see the spec, the docs). Every form control other than the output
element must contain a label
element. The value of label
element is used as name of accessible object.
help
Specifies contextual help for the containing form control (see the spec, the docs). The help
element has alert
role.
hint
Similar to a tooltip (see the spec, the docs). The value of hint
element is used as description of accessible object.
alert
This message will be shown when the form control cannot properly bind to instance data or when the instance data value is invalid or out of the specified range of selectable values (see the spec, the docs). The alert
element has alert
role for both usual and inline alert
elements.
message
Used in combination with event listeners to display a message to the user when the specified event occurs (see the spec, the docs). The message
element has alert
role.
Resources
Below you will find a list of XForms/Accessiblity resources:
- Mozilla accessibility project at mozilla.org
- XForms specification at w3.org
- Mozilla XForms project at mozilla.org
- UI XForms elements references at devmo