You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -249,11 +249,42 @@ <h4>Computation steps</h4>
249
249
<liid="step1">Set the <code>root node</code> to the given element, the <code>current node</code> to the <code>root node</code>, and the <code>total accumulated text</code> to the empty string (""). If the <code>root node</code>'s role prohibits naming, return the empty string ("").</li>
250
250
<liid="step2">Compute the text alternative for the <code>current node</code>:
251
251
<ol>
252
-
<liid="step2A">If the <code>current node</code> is <aclass="termref">hidden</a><strong>and is not</strong> directly referenced by <code>aria-labelledby</code> or <code>aria-describedby</code>, nor directly referenced by a native host language text alternative <aclass="termref">element</a> (e.g. <code>label</code> in HTML) or <aclass="termref">attribute</a>, return the empty string.
252
+
<liid="step2A">If the <code>current node</code> is <aclass="termref">hidden</a><strong>and is</strong>:
253
+
<ul>
254
+
<li><strong>Not</strong> part of an <code>aria-labelledby</code> or <code>aria-describedby</code> traversal, where the node directy referenced by that relation was hidden.</li>
255
+
<li><strong>Nor</strong> part of a native host language text alternative <aclass="termref">element</a> (e.g. <code>label</code> in HTML) or <aclass="termref">attribute</a> traversal, where the root of that traversal was hidden.</li>
256
+
</ul>
257
+
Return the empty string.
258
+
<div><details>
259
+
<summary>Comment:</summary>
260
+
<p>It's important to clarify the broad definition of hidden for the purposes of accessible name calculation:
261
+
<ul>
262
+
<li>Nodes with CSS properties <code>display:none</code>, <code>visibility:hidden</code>, <code>visibility:collapse</code> or <code>content-visibility:hidden</code>: They are considered hidden, as they match the guidelines "not perceivable" and "explicitly hidden".</li>
263
+
<li>Nodes with CSS properties <code>opacity:0</code> or <code>filter:opacity(0%)</code>, or similar SVG mechanisms: They are not considered hidden. Text hidden with these methods can still be selected or copied, and user agents still expose it in their accessibility trees.</li>
264
+
<li>Nodes with the <code>aria-hidden="true"</code> property: it is considered hidden, matching the "explicitly hidden" guideline.</li>
265
+
<li>Nodes hidden off screen or behind another object: they are not considered hidden. They are exposed in the accessibility tree and they can even name on-screen objects.</li>
266
+
</ul></p>
267
+
</details></div>
253
268
<div><details>
254
269
<summary>Comment:</summary>
255
270
<p>By default, <aclass="termref">assistive technologies</a> do not relay hidden information, but an author can explicitly override that and include hidden text as part of the <aclass="termref">accessible name</a> or <aclass="termref">accessible description</a> by using <code>aria-labelledby</code> or <code>aria-describedby</code>. </p>
256
271
</details></div>
272
+
<div><details>
273
+
<summary>Example:</summary>
274
+
<p>The following examples show the meaning of the clause "Not part of an <code>aria-labelledby</code> or <code>aria-describedby</code> traversal, where the node directy referenced by that relation was hidden.".</p>
275
+
<p>First, <code>element1</code>'s <aclass="termref">accessible name</a> is "hello" because, although <code>element3</code> is hidden, it is part of an <code>aria-labelledby</code> traversal started in <code>element2</code>, which is hidden too.</p>
<p>Alternatively, <code>element1</code> has no <aclass="termref">accessible name</a> if <code>element3</code> is hidden and it is part of an <code>aria-labelledby</code> traversal started in <code>element2</code>, but <code>element2</code> is not hidden.</p>
<p>The result of <ahref="#step2B.ii.b">step 2B.ii.b</a> in combination with <ahref="#step2A">step 2A</a> means that <aclass="termref">user agents</a> MUST include all nodes in the subtree as part of the <aclass="termref">accessible name</a> or <aclass="termref">accessible description</a>, when the node referenced by <code>aria-labelledby</code> or <code>aria-describedby</code> is hidden.</p>
275
309
<div><details>
276
310
<summary>Example:</summary>
277
311
<p>The following example shows the meaning of the clause "… and the <code>current node</code> is not already part of an <code>aria-labelledby</code> traversal …" .</p>
0 commit comments