Accessibility/XForms: Difference between revisions
Line 11: | Line 11: | ||
<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. | <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 == | ||
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. |
Revision as of 11:16, 6 February 2007
<< Back to Accessibility Home Page
Intoduction
Assistive technologies API for XForms is supported starting from Firefox 3 (Gecko 1.9). 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.
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
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.