Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expectations for aria-hidden and focused elements #2181

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11603,7 +11603,8 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<div class="state-description">
<p><a>Indicates</a>, when set to <code>true</code>, that an <a>element</a> and its entire subtree are hidden from assistive technology, regardless of whether it is visibly rendered.</p>
<p>User agents determine an element's [=element/hidden=] status based on whether it is rendered, and the rendering is usually controlled by CSS. For example, an element whose <code>display</code> property is set to <code>none</code> is not rendered. An element is considered [=element/hidden=] if it, or any of its ancestors are not rendered or have their <code>aria-hidden</code> attribute value set to <code>true</code>.</p>
<p>Authors MAY, with caution, use aria-hidden to hide visibly rendered content from assistive technologies <em>only</em> if the act of hiding this content is intended to improve the experience for users of assistive technologies by removing redundant or extraneous content. Authors using aria-hidden to hide visible content MUST ensure that identical or equivalent meaning and functionality is exposed to assistive technologies.</p>
<p>Authors MAY, with caution, use aria-hidden to hide visibly rendered content from assistive technologies <em>only</em> if the act of hiding this content is intended to improve the experience for users of assistive technologies by removing redundant or extraneous content. Authors using aria-hidden to hide visible content MUST ensure that identical or equivalent meaning and functionality is exposed to assistive technologies. Whenever possibe it's strongly recommended authors use host language features to <a href="#tree_exclusion">exclude elements from the accessibility tree</a>.</p>
<p>Additionally, authors SHOULD ensure that any elements that are accessibility descendants of an aria-hidden element, or any elements which have been marked as aria-hidden themselves, are prevented from receiving focus. If an aria-hidden element or a descendant of an aria-hidden ancestor receives focus, User Agents MUST ignore the aria-hidden state of any ancestor to the focused element from that point forward, resulting in the entire subtree to be exposed to assistive technologies. The ancestor aria-hidden markup will continue to be ignored, even once the element loses focus or is no longer focusable.</p>
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
<p class="note">Authors are advised to use extreme caution and consider a wide range of disabilities when hiding visibly rendered content from assistive technologies. For example, a sighted, dexterity-impaired individual might use voice-controlled assistive technologies to access a visual interface. If an author hides visible link text "Go to checkout" and exposes similar, yet non-identical link text "Check out now" to the accessibility API, the user might be unable to access the interface they perceive using voice control. Similar problems can also arise for screen reader users. For example, a sighted telephone support technician might attempt to have the blind screen reader user click the "Go to checkout" link, which they might be unable to find using a type-ahead item search ("Go to…").</p>
<p class="note">As of ARIA 1.3, <code><sref>aria-hidden</sref>="false"</code> is now synonymous with <code>aria-hidden="undefined"</code>.</p>
<p class="note">The original intent for <code>aria-hidden="false"</code> was to allow user agents to expose content that was otherwise hidden from the accessibility tree. However, due to ambiguity in the specification and inconsistent browser support for the <code>false</code> value, the original intent is no longer supported.</p>
Expand Down Expand Up @@ -13171,12 +13172,12 @@ <h1><dfn class="export">Accessibility Tree</dfn></h1>
<h2>Excluding Elements from the Accessibility Tree</h2>
<p>The following [=elements=] 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, 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>
<li>Elements, including their descendent elements, that have host language semantics specifying that the element is not displayed or is meant to be treated as inert. For insance, elements with CSS <code>display:none</code>, <code>visibility:hidden</code>, the HTML <code>hidden</code> attribute in its default state, or HTML's <code>inert</code> attribute.</li>
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
<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>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> or <code>aria-hidden=&quot;undefined&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 with the following roles have the characteristic &quot;Children Presentational: True&quot;:</p>
Expand Down
Loading