mozilla
Your Search Results

    XUL Accessibility

    Introduction

    This article shows how XUL control elements are mapped to accessibility API. It is much in progress.

    AT API

    General rules

    This section holds some rules applied to generating accessible name and description.

    Aggregating the text from element subtree

    • if the child node is hidden then it's ignored excepting the case when the element used as label is hidden itself
    • If the child node is text node then its rendered value is appended
    • If the child node is element then
      • if it implements nsIDOMXULLabeledControlElement then the value of label property is appended
      • otherwise
        • if it's a label element then then value attribute is appended
        • otherwise append tooltiptext attribute
      • append the accessible value

    Searching specific element in neighbour of the element

    • search inside the element subtree
    • go up through parents (max level is 5) and search inside theirs subtrees
    • if the element is anonymous then search in whole anonymous subtree, here the attribute anonid is used instead of id attribute

    Accessible properties

    This section describes common rules how accessibility properties are formed for XUL elements.

    name

    The following rules to generate accessible name are applied:

    • check aria-labelledby attribute, name is generated from elements pointed by aria-labelledby attribute
    <description id="descr1">label1</description>
    <description id="descr2">label2</description>
    <textbox aria-labelledby="descr1 descr2" />
    
    <label value="it's label for control" control="control" />
    <hbox role="grouping" id="control" />
    
    • get tooltiptext attribute
    • if the element is anonymous child of the element that is the direct child of toolbaritem element or the element is direct child of toolbaritem element then title attribute of toolbaritem element is used (currently it's used in Firefox UI only)
    • if the element has ARIA role and the role allows to aggregate name from subtree of element then generate name from subtree of the element

    description

    The following rules to generate accessible description are applied:

    • check aria-describedby attribute, description is generated from elements pointed by aria-describedby attribute
    <description id="descr1">label1</description>
    <description id="descr2">label2</description>
    <textbox aria-describedby="descr1 descr2" />
    
    • if neighbour of the element has description element pointing to this element by the control attribute, if the description element is found then use its content.
    <description value="it's label for control" control="control" />
    <hbox role="grouping" id="control" />
    
    • get tooltiptext attribute

    value

    • If the ARIA role is used and it allows to have accessible value then aria-valuetext or aria-valuenow are used
    • If the element is XLink then value is generated from link location

    actions

    • If the element is XLink then jump action is exposed
    • If the element has registered click event handler then click action is exposed

    XUL Elements

    notification

    Used to display an informative message. Role ROLE_ALERT

    <panel noautofocus = "true" />

    ROLE_ALERT

    Document Tags and Contributors

    Tags: 
    Contributors to this page: Sheppy, trevorh, Surkov.alexander
    Last updated by: Sheppy,