Visit Mozilla.org

Accessibility:AT-APIs:Gecko:Attrs

From MDC


« AT APIs Support Page

Contents

[edit] Introduction

You can obtain object attributes by nsIAccessible.getAttributes() method.

[edit] Object Attributes List

[edit] Common attributes

id
Any value, defined by UI/content developers. Used to indicate a persistant identifier for any object, useful for scripting

Applied to: any role which related DOM node has ID attribute
tag
The actual markup tag used to create this element (also used in XUL)

Applied to: any role
xml-roles
If a dynamic content accessibility role string is used, it is exposed here. This may provide more information than the AT-SPI role, which is best-fit. In the future, this may be a space or comma delimited list of roles

Applied to: any role
class
The class name for an element from HTML, XUL, SVG etc. This is useful for retrieving Microformat semantics for an element.

[edit] Group attributes

level
For headings, the heading level. For outline items, the indentation level. For diagrams with levels, each item can have its level specified. The level value is 1-based.

Applied to: XXX list roles
posinset
If this item is in a group, what is the item number within the group, where the size is defined by the setsize attribute. The first item should have posinset="1", and the last item should have a posinset value equal to the setsize.
Applied to: XXX role list
Exposed in ARIA: aria-posinset
setsize
If this item is in a group, this indicates the number of items in the group. This is useful when combined with the posinset object attribute.

Exposed in ARIA: aria-setsize
Native exposed: XXX list roles

[edit] Live region attribues

atomic
true when the entire region should be presented as a whole, when changes within it are considered important enough to automatically present.

Applied to: any role
Exposed via ARIA: aria-atomic
channel
"notify" when live changes can be presented alongside changes of the same politeness level. If a second channel is not available, the live changes should be prioritized slightly higher than changes of the same politeness. The attribute container-channel gives the computed value for this node (e.g. if there is any container element with the channel attribute the closes thing with the channel attribute wins).

Applied to: any role
Exposed via ARIA: aria-channel
live
A hint as to whether changes within the current region or subtree should be automatically presented. Possible values are "off" which is the same as not being set -- this means the region is not live. Other possible values are "polite", "assertive" and "rude", which is a suggestion for the policy when interrupting the user for changes to this region. Please see the ARIA States and Properties module for more information. Additional information may be provide by the object attributes atomic and relevant.

Applied to: any role
Exposed in ARIA: aria-live
relevant
Space delimited string with keywords describing what kinds of changes in the subtree are informational, as opposed to presentational. If not specified, the default should be considered "additions text", which indicates that newly created objects and changes to text and text equivalents should be considered relevant, and that the hiding or removal of items is not. Please see the ARIA States and Properties module for more information.

Exposed in ARIA: aria-relevant
container-atomic
Is this change inside a region that should always be presented at once. If yes, member-of relation will point to the root of the region. See the Live Region Support for more information.
container-busy
The current changes are not yet complete. A state change event for the A11y API's BUSY state will be fired on the container object currently marked as BUSY, once it is no longer BUSY. This is especially important in atomic regions. The entire atomic region should be presented once when it is finally no longer BUSY. See the Live Region Support for more information.
container-channel
If "notify", treat as a separate channel with slightly higher priority than other messages of same politeness. It should not clear the "main" queue of any messages. Optionally, "notify" messages may be presented via alternate means, such as a Braille display, or second audio channel. See the Live Region Support for more information.
container-live
Interruption policy. See the Live Region Support for more information.
container-relevant
What types of mutations are possibly relevant?. See the Live Region Support for more information.
event-from-input
Was the root cause of this event explicit user input?. See the Live Region Support for more information.
member-of
Points to the root of the atomic container that this object is in. This will always be an ancestor of the current object.. See the Live Region Support for more information.

[edit] Common widget attributes

checkable
true when the widget is known to behave like a checkbox. Note some widgets which appear to be checkboxes might in fact be cyclers (see "cycles" below). Action 0 is named either "check" or "uncheck".

Applied to: STATE_CHECKABLE state
datatype
A qname that refers to an XSD (schema) defined type. For example, a datatype may be xsd:integer. When this is not specified, the default is string, unless the Value interface is exposed, which indicates the type is numeric. For more information please read about schema datatypes.

Applied to: any widget that accepts input
Exposed via ARIA: aria-datatype
Exposed in XForms: from boud instance node datatype
haspopup
true when the object displays a pop-up menu or window when invoked.

Applied to: STATE_HASPOPUP
Exposed in ARIA: aria-haspopup
Note: this is only supported on ATK/AT-SPI. On MSAA, STATE_SYSTEM_HASPOPUP is used.
sort
if "ascending" or "descending", then child items within the container are currently sorted as indicated.

Applied to: any container
Exposed in ARIA: aria-sort

[edit] Image related attributes

src
src attribute is placed on HTML image element

Applied to: {[a11yRoleRef|ROLE_GRAPHIC}} for the <html:img/> element.

[edit] Tree related attributes

cycles
"true" when the tree cell is a cycler, which means each click will cycle to the next option. In this case action 0 is called "cycles", which moves to the next option in the same way a manual click does.

Applied to: {[a11yRoleRef|ROLE_CELL}} for the <xul:tree/>
Note: it's not exposed currently

[edit] Table related attributes

layout-guess
true when Gecko's heuristic determines that it is a table that is probably used for layout, not for table.
Value not set means it is probably a data table.

Applied to: ROLE_TABLE
cell-index
The index of the table cell accessible. Should be used instead of nsIAccessible.indexInParent property because when there are accessibles between tree accessible and cell accessible this property gives wrong result.

Applied to ROLE_CELL
Note: currently the attribute is applied to cell accessible for html:td elements placed inside html:table element.

[edit] Hypertext attributes

formatting
"block" if the object uses block formatting, and thus starts on a new line and ends with a hard line break that is not visible in the actual text. For example, a heading, paragraph or list item are typically formatted as a block, but there is no requirement that they do so. Their formatting may have been changed with CSS. An example of this is often horizontal navigation bars with list items that are formatted with CSS display: inline.

Applied to: any object that supports the hypertext interface
Note: it's not currently exposed
line-number
The current line number of the caret, whether simply because the "browse with caret" option is on, or the caret used for editing text. The line number is relative to the top of the currently focused area (the document, a rich text editable area, or an input control).

Applied to: any focusable accessible text object

[edit] Value attributes

valuetext
A text equivalent to the current value, such as "High" in a slider or "Unzipping files" in a progress meter

Applied to: Anything that supports the value interface, especially a slider or progress meter

[edit] Text attributes

static
true for list bullet/numbering text or layout-inserted text (such as via CSS pseudo styles :before or :after)