This Wiki page is edited by participants of the Protocols and Formats Working Group. It does not necessarily represent consensus and it may have incorrect information or information that is not supported by other Working Group participants, WAI, or W3C. It may also have some very useful information.
Draft re-write of Section 5.1
From Protocols and Formats Working Group Wiki
The text of Section 5.1.1 and 5.1.2 needs to be re-written. As currently written, 5.1.1 requires that objects meeting any of the criteria must be in the tree. This conflicts with language in 5.1.2 where objects with certain conditions must not be in the tree.
5.1.1. Excluding Elements from the Accessibility Tree
The following elements are not exposed via the accessibility API and user agents MUST NOT include them in the accessibility tree:
- Elements with "presentation" as the first mappable role provided in the role attribute string, according to the rules for presentation role defined in Accessible Rich Internet Applications (WAI-ARIA) 1.0 [ARIA].
- Elements, including their descendents, that have host language semantics specifying that the element is not displayed, such as CSS display:none or visibility:hidden or the HTML5 hidden attribute.
If not already excluded from the accessibility tree per the above rules, user agents SHOULD NOT include the following elements in the accessibility tree:
- Elements, including their descendents, that have a WAI-ARIA global attribute of aria-hidden="true". In other words, aria-hidden="true" on a parent overrides aria-hidden="false" on descendants.
- Children of objects which have the characteristic "Children Presentational: True":
5.1.2. Including Elements in the Accessibility Tree
If not already excluded from the accessibility tree per the rules in Section 5.1.1, user agents MUST provide an accessible object in the accessibility tree for DOM elements that meet any of the following criteria:
- Text elements
- Elements that may fire an accessibility API event
- Elements that are focusable, or have an ID attribute and an ancestor with the aria-activedescendant attribute that matches the implicit or explicit semantics of the required context role. In either case, the element may receive focus and need to fire a FOCUS event.
- Elements that have a mappable role in the role attribute string (see Role Mapping below).
- Elements that have a WAI-ARIA attribute but do not have aria-hidden="true". (See above for additional guidance on aria-hidden.)
- Elements that have an ID which is referenced by another element via a WAI-ARIA relation (aria-controls, aria-describedby, aria-flowto, aria-labelledby or aria-owns) and are not hidden.
- Note: Text equivalents for hidden referenced objects may still be used in the name and description calculation even when not included in the accessibility tree.