Skip to content

Commit

Permalink
Clarify wording in "Including Elements in the Accessibility Tree" sec…
Browse files Browse the repository at this point in the history
…tion (#1100)

Co-Authored-By: Matt King <a11yThinker@Gmail.com>
Co-authored-by: James Nurthen <james@nurthen.com>
  • Loading branch information
3 people committed Apr 22, 2020
1 parent 09d27e5 commit 37ca124
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions index.html
Expand Up @@ -13192,22 +13192,22 @@ <h1>Accessibility Tree</h1>
<h2>Excluding Elements from the Accessibility Tree</h2>
<p>The following <a>elements</a> are not exposed via the <a>accessibility <abbr title="Application Programing Interfaces">API</abbr></a> and user agents MUST NOT include them in the <a class="termref">accessibility tree</a>:</p>
<ul>
<li>Elements with <rref>none</rref> or <rref>presentation</rref> as the first role in the role attribute. However, their exclusion is conditional and depends on other factors. In addition, the element's descendants and text content are generally included. These exceptions and conditions are documented in the <a href="#conflict_resolution_presentation_none">Presentational Roles Conflict Resolution</a> section.</li>
<li>Elements, including their descendent elements, that have host language semantics specifying that the element is not displayed, such as CSS <code>display:none</code>, <code>visibility:hidden</code>, or the HTML <code>hidden</code> attribute.</li>
</ul>
<li>Elements with <rref>none</rref> or <rref>presentation</rref> as the first role in the role attribute. However, their exclusion is conditional. In addition, the element's descendants and text content are generally included. These exceptions and conditions are documented in the <a href="#presentation">presentation (role)</a> section.</li>
</ul>
<p>If not already excluded from the accessibility tree per the above rules, user agents SHOULD NOT include the following elements in the accessibility tree:</p>
<ul>
<li>Elements, including their descendants, that have <sref>aria-hidden</sref> set to <code>true</code>. In other words, <code>aria-hidden=&quot;true&quot;</code> on a parent overrides <code>aria-hidden=&quot;false&quot;</code> on descendants.</li>
<li>
<p>Any descendants of elements that have the characteristic &quot;<a href="#childrenArePresentational">Children Presentational: True</a>&quot; unless the descendant is not allowed to be presentational because it meets one of the conditions for exception described in <a href="#conflict_resolution_presentation_none">Presentational Roles Conflict Resolution</a>. However, the text content of any excluded descendants is included.</p>
<p>Elements having one of the following roles have the characteristic &quot;Children Presentational: True&quot;:</p>
<p>Elements with the following roles have the characteristic &quot;Children Presentational: True&quot;:</p>
<ul>
<li><rref>button</rref></li>
<li><rref>checkbox</rref></li>
<li><rref>img</rref></li>
<li><rref>math</rref></li>
<li><rref>menuitemcheckbox</rref></li>
<li><rref>menuitemradio</rref></li>
<li><rref>meter</rref></li>
<li><rref>option</rref></li>
<li><rref>progressbar</rref></li>
<li><rref>radio</rref></li>
Expand All @@ -13222,14 +13222,17 @@ <h2>Excluding Elements from the Accessibility Tree</h2>
</section>
<section id="tree_inclusion">
<h2>Including Elements in the Accessibility Tree</h2>
<p>If not already excluded from the accessibility tree per the rules above in <a href="#tree_exclusion">Excluding Elements in the Accessibility Tree</a>, user agents MUST provide an <a>accessible object</a> in the <a>accessibility tree</a> for <abbr title="Document Object Model">DOM</abbr> <a>elements</a> that meet any of the following criteria:</p>
<p>If not excluded from the accessibility tree per the rules above in <a href="#tree_exclusion">Excluding Elements in the Accessibility Tree</a>, user agents MUST provide an <a>accessible object</a> in the <a>accessibility tree</a> for <abbr title="Document Object Model">DOM</abbr> <a>elements</a> that meet any of the following criteria:</p>
<ul>
<li><a>Text nodes</a></li>
<li>Elements that may fire an <a>accessibility <abbr title="Application Program Interface">API</abbr></a> <a>event</a>.</li>
<li>Elements that are focusable, or have an ID <a>attribute</a> and an ancestor with the <pref>aria-activedescendant</pref> attribute that matches the implicit or explicit <a>semantics</a> of the required context role. In either case, the element may receive focus and may fire an <a>accessibility <abbr title="Application Program Interface">API</abbr></a> focus event.</li>
<li>Elements that are not <a>hidden</a> and may fire an <a>accessibility <abbr title="Application Program Interface">API</abbr></a> <a>event</a>:
<ul>
<li>Elements that are <a>focusable</a> even if the element or one of its ancestor elements has its <sref>aria-hidden</sref> attribute set to <code>true</code>.</li>
<li>Elements that are a valid target of an <pref>aria-activedescendant</pref> attribute.</li>
</ul>
</li>
<li>Elements that have an explicit role or a global <abbr title="Accessible Rich Internet Application">WAI-ARIA</abbr> attribute and do not have <sref>aria-hidden</sref> set to <code>true</code>. (See <a href="#tree_exclusion">Excluding Elements in the Accessibility Tree</a> for additional guidance on <sref>aria-hidden</sref>.)</li>
<li>Elements that have an ID which is referenced by another element via a <abbr title="Accessible Rich Internet Application">WAI-ARIA</abbr> property and are not <a>hidden</a>.
<p class="note">Text equivalents for hidden referenced objects may still be used in the <a href="#mapping_additional_nd" class="accname">name and description computation</a> even when not included in the accessibility tree.</p>
<li>Elements that are not <a>hidden</a> and have an ID that is referenced by another element via a <abbr title="Accessible Rich Internet Application">WAI-ARIA</abbr> property.
<p class="note">Text equivalents for hidden referenced objects may still be used in the <a href="#mapping_additional_nd" class="accname">name and description computation</a> even when not included in the accessibility tree.</p>
</li>
</ul>
</section>
Expand Down

0 comments on commit 37ca124

Please sign in to comment.