Skip to content

Commit 31766e3

Browse files
adampagescottaoharacookiecrook
authored
Clarify relationship between aria-hidden and aria-owns (#1839)
Co-authored-by: Scott O'Hara <[email protected]> Co-authored-by: James Craig <[email protected]>
1 parent 0256e79 commit 31766e3

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

index.html

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14033,7 +14033,7 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
1403314033
<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>
1403414034
<p>
1403514035
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
14036-
<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
14036+
<code>display</code> property is set to <code>none</code> is not rendered. An element will be <a href="#tree_exclusion">excluded from the accessibility tree</a> if it or any of its <a href="#tree_relationships">accessibility ancestors</a> are [=element/hidden=] or have their
1403714037
<code>aria-hidden</code> attribute value set to <code>true</code>.
1403814038
</p>
1403914039
<p>
@@ -14857,6 +14857,39 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
1485714857
<pref>aria-owns</pref> element references in order to build a consistent model of the content.
1485814858
</p>
1485914859
<p>Authors MUST NOT specify <pref>aria-owns</pref> on an element which has <a href="#childrenArePresentational">Presentational Children</a>.</p>
14860+
<p><pref>aria-owns</pref> is resolved in the order it is encountered in the <abbr title="Document Object Model">DOM</abbr>. Every element referenced by <pref>aria-owns</pref> will determine its <a href="#tree_exclusion">exposure to the accessibility tree</a> after its change in ownership is resolved. However:</p>
14861+
<ul>
14862+
<li>User agents MUST NOT resolve <pref>aria-owns</pref> when it is set on an element that has been <a href="#tree_exclusion">excluded from the accessibility tree</a>.</li>
14863+
<li>User agents MUST NOT resolve <pref>aria-owns</pref> when it references an element that is, or has a DOM ancestor that is, [=element/hidden from all users=].</li>
14864+
</ul>
14865+
<p>In the following example, “(opens in a new window)” is <a href="#tree_inclusion">included in the accessibility tree</a> by virtue of its changed ownership.</p>
14866+
<pre class="example highlight">
14867+
&lt;a href="https://www.w3.org/" target="_blank" aria-owns="new-window-warning"&gt;
14868+
World Wide Web Consortium
14869+
&lt;/a&gt;
14870+
&lt;div aria-hidden="true"&gt;
14871+
&lt;span id="new-window-warning"&gt; (opens in a new window)&lt;/span&gt;
14872+
&lt;/div&gt;
14873+
</pre>
14874+
<p>In the following example, “(opens in a new window)” remains <a href="#tree_exclusion">excluded from the accessibility tree</a> since its <abbr title="Document Object Model">DOM</abbr> ancestor is [=element/hidden from all users=] in host language terms.</p>
14875+
<pre class="example highlight">
14876+
&lt;a href="https://www.w3.org/" aria-owns="new-window-warning"&gt;
14877+
World Wide Web Consortium
14878+
&lt;/a&gt;
14879+
&lt;div hidden&gt;
14880+
&lt;span id="new-window-warning"&gt; (opens in a new window)&lt;/span&gt;
14881+
&lt;/div&gt;
14882+
</pre>
14883+
<p>In the following example, <code>&lt;div id="instructions"&gt;</code> and its text content remain exposed and unmoved <a href="#tree_inclusion">in the accessibility tree</a> since the would-be accessibility parent element with <code>aria-owns</code> is [=element/hidden from all users=].</p>
14884+
<pre class="example highlight">
14885+
&lt;div hidden aria-owns="instructions"&gt;
14886+
...
14887+
&lt;/div&gt;
14888+
...
14889+
&lt;div id="instructions"&gt;
14890+
Instructions go here...
14891+
&lt;/div&gt;
14892+
</pre>
1486014893
</div>
1486114894
<table class="def">
1486214895
<caption>

0 commit comments

Comments
 (0)