Skip to content

Commit 114fe15

Browse files
authored
Editorial: Remove all the collapsed content in accname (#218)
1 parent 71fdb5d commit 114fe15

File tree

1 file changed

+24
-33
lines changed

1 file changed

+24
-33
lines changed

index.html

Lines changed: 24 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -366,22 +366,19 @@ <h4>Computation steps</h4>
366366
<li><strong>Nor</strong> part of a native host language text alternative <a class="termref">element</a> (e.g. <code>label</code> in HTML) or <a class="termref">attribute</a> traversal, where the root of that traversal was hidden.</li>
367367
</ol>
368368
Return the empty string.
369-
<div><details>
370-
<summary>Comment:</summary>
369+
<div class="note">
371370
<p>It's important to clarify the broad definition of hidden for the purposes of accessible name calculation:</p>
372371
<ol>
373372
<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>
374373
<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>
375374
<li>Nodes with the <code>aria-hidden="true"</code> property: it is considered hidden, matching the "explicitly hidden" guideline.</li>
376375
<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>
377376
</ol>
378-
</details></div>
379-
<div><details>
380-
<summary>Comment:</summary>
377+
</div>
378+
<div class="note
381379
<p>By default, <a class="termref">assistive technologies</a> do not relay hidden information, but an author can explicitly override that and include hidden text as part of the <a class="termref">accessible name</a> or <a class="termref">accessible description</a> by using <code>aria-labelledby</code> or <code>aria-describedby</code>. </p>
382-
</details></div>
383-
<div><details>
384-
<summary>Example:</summary>
380+
</div>
381+
<aside class="example">
385382
<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>
386383
<p>First, <code>element1</code>'s <a class="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>
387384
<pre class="example highlight">
@@ -390,13 +387,14 @@ <h4>Computation steps</h4>
390387
&lt;element3 id="el3" class="hidden"&gt;hello&lt;/element3&gt;
391388
&lt;/element2&gt;</code>
392389
</pre>
390+
</aside>
391+
<aside class="example">
393392
<p>Conversely, <code>element1</code> has no <a class="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>
394-
<pre class="example highlight"><code>&lt;element1 id="el1" role="button" aria-labelledby="el2" /&gt;
393+
<pre class="highlight"><code>&lt;element1 id="el1" role="button" aria-labelledby="el2" /&gt;
395394
&lt;element2 id="el2"&gt;
396395
&lt;element3 id="el3" class="hidden"&gt;hello&lt;/element3&gt;
397396
&lt;/element2&gt;</code>
398-
</pre>
399-
</details></div>
397+
</aside>
400398
</li>
401399
<li id="comp_labelledby" name="step2B"><em>LabelledBy:</em> Otherwise, if the <code>current node</code> has an <code>aria-labelledby</code> [=attribute=] that contains at least one valid IDREF, and the <code>current node</code> is not already part of an ongoing <code>aria-labelledby</code> or <code>aria-describedby</code> traversal, process its IDREFs in the order they occur:
402400
<ol>
@@ -410,21 +408,19 @@ <h4>Computation steps</h4>
410408
</li>
411409
<li id="comp_labelledby_return" name="step2B.iii">Return the <code>accumulated text</code> if it is not the empty string ("").</li>
412410
</ol>
413-
<div><details>
414-
<summary>Comment:</summary>
411+
<div>
415412
<p>The result of <a href="#comp_labelledby_recursion">LabelledBy Recursion</a> in combination with <a href="#comp_hidden_not_referenced">Hidden Not Referenced</a> means that <a class="termref">user agents</a> MUST include all nodes in the subtree as part of the <a class="termref">accessible name</a> or <a class="termref">accessible description</a>, when the node referenced by <code>aria-labelledby</code> or <code>aria-describedby</code> is hidden.</p>
416-
<div><details>
417-
<summary>Example:</summary>
413+
<aside class="example">
418414
<p>The following example shows the meaning of the clause "&#8230; and the <code>current node</code> is not already part of an <code>aria-labelledby</code> traversal &#8230;" .</p>
419415
<ol>
420416
<li><code>element1</code>'s <a class="termref">accessible name</a> is "hello" because this is a first traversal of its <code>aria-labelledby</code>, leading to <code>element3</code>.</li>
421417
<li><code>element2</code> has no <a class="termref">accessible name</a>. The computation involves a first traversal of its <code>aria-labelledby</code> leading to <code>element1</code>, but <code>element1</code>'s <code>aria-labelledby</code> is not subsequently followed. </li>
422418
</ol>
423-
<pre class="example highlight"><code>&lt;element1 id="el1" aria-labelledby="el3" /&gt;
419+
<pre class="highlight"><code>&lt;element1 id="el1" aria-labelledby="el3" /&gt;
424420
&lt;element2 id="el2" aria-labelledby="el1" /&gt;
425421
&lt;element3 id="el3"&gt; hello &lt;/element3&gt;</code>
426422
</pre>
427-
</details></div>
423+
</aside>
428424
</li>
429425
<li id="comp_embedded_control" name="step2C"><em>Embedded Control:</em> Otherwise, if the <code>current node</code> is a control embedded within the label (e.g. any element directly referenced by <code>aria-labelledby</code>) for another <a class="termref">widget</a>, where the user can adjust the embedded control's value, then return the embedded control as part of the text alternative in the following manner:
430426
<ol>
@@ -438,21 +434,19 @@ <h4>Computation steps</h4>
438434
</ol>
439435
</li>
440436
</ol>
441-
<div><details>
442-
<summary>Example:</summary>
437+
<aside class="example">
443438
<p>Consider a <a class="role-reference" href="#checkbox">check box</a> label that contains a text input field: "Flash the screen [input] times". If the user has entered "5" for the embedded <a class="role-reference" href="#textbox">textbox</a>, the complete label is "Flash the screen 5 times", e.g.: </p>
444-
<pre class="example highlight">
439+
<pre class="highlight">
445440
<code>&lt;div role="checkbox" aria-checked="false"&gt;Flash the screen &lt;span role="textbox" aria-multiline="false"&gt; 5 &lt;/span&gt; times&lt;/div&gt;</code>
446441
</pre>
447-
</details></div>
442+
</aside>
448443
</li>
449444
<li id="comp_label" name="step2D"><em>AriaLabel:</em> Otherwise, if the <code>current node</code> has an <code>aria-label</code> [=attribute=] whose value is not undefined, not the empty string, nor, when trimmed of [=ascii whitespace|whitespace=], is not the empty string:
450445
<ol>
451446
<li>If traversal of the <code>current node</code> is due to recursion <strong>and</strong> the <code>current node</code> is an embedded control, ignore <code>aria-label</code> and skip to rule <a href="#comp_embedded_control">Embedded Control</a>.</li>
452447
<li>Otherwise, return the value of <code>aria-label</code>.</li>
453448
</ol>
454-
<div><details>
455-
<summary>Example:</summary>
449+
<aside class="example">
456450
<p>The following example shows the interaction of <code>aria-labelledby</code> and <code>aria-label</code> when a [=nodes|node=] has an <code>aria-labelledby</code> that refers to itself. The <code>&lt;span role="button"&gt;</code> elements have the <a class="termref">accessible names</a> "Delete Documentation.pdf" and "Delete HolidayLetter.pdf", respectively.</p>
457451
<pre class="example highlight"><code>&lt;h1&gt;Files&lt;/h1&gt;
458452
&lt;ul&gt;
@@ -465,14 +459,13 @@ <h4>Computation steps</h4>
465459
<strong>&lt;span role=&quot;button&quot; tabindex=&quot;0&quot; id=&quot;del_row2&quot; aria-label=&quot;Delete&quot; aria-labelledby=&quot;del_row2 file_row2&quot;&gt;&lt;/span&gt;</strong>
466460
&lt;/li&gt;
467461
&lt;/ul&gt;</code></pre>
468-
</details></div>
462+
</aside>
469463
</li>
470464
<li id="comp_host_language_label" name="step2E"><em>Host Language Label:</em> Otherwise, if the <code>current node</code>'s native markup provides an [=attribute=] (e.g. <code>alt</code>) or [=element=] (e.g. HTML <code>label</code> or SVG <code>title</code>) that defines a text alternative, return that alternative in the form of a <code>flat string</code> as defined by the host language, unless the element is marked as presentational (<code>role="presentation"</code> or <code>role="none"</code>).
471465
<div class="note">See <a href="https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation">HTML-AAM</a>, <a href="https://www.w3.org/TR/svg-aam-1.0/#mapping_additional_nd">SVG-AAM</a>, or other host language documentation for more information on markup that defines a text alternative.</div>
472-
<div><details>
473-
<summary>Comment:</summary>
466+
<div class="note">
474467
<p>For example, in <abbr title="Hypertext Markup Language">HTML</abbr>, the <code>img</code> element's <code>alt</code> attribute defines a text alternative string, and the <code>label</code> element provides text for the referenced form element. In <abbr title="SVG2">SVG2</abbr>, the <code>desc</code> and <code>title</code> elements provide a description of their parent element. </p>
475-
</details></div>
468+
</div>
476469
</li>
477470
<li id="comp_name_from_content" name="step2F"><em>Name From Content:</em> Otherwise, if the <code>current node's</code> <a class="termref">role</a> allows <a class="specref" href="#namefromcontent">name from content</a>, or if the <code>current node</code> is referenced by <code>aria-labelledby</code>, <code>aria-describedby</code>, or is a native host language text alternative [=element=] (e.g. <code>label</code> in HTML), or is a descendant of a native host language text alternative [=element=]:
478471
<ol>
@@ -493,18 +486,16 @@ <h4>Computation steps</h4>
493486
<li id="comp_name_from_content_return" name="step2F.iv">Return the <code>accumulated text</code> if it is not the empty string ("").</li>
494487
</ol>
495488
<p><strong>Important</strong>: Each [=nodes|node=] in the subtree is consulted only once. If text has been collected from a descendant, but is referenced by another IDREF in some descendant node, then that second, or subsequent, reference is not followed. This is done to avoid infinite loops. </p>
496-
<div><details>
497-
<summary>Comment:</summary>
489+
<div class="note">
498490
<p>This step can apply to the child nodes themselves, which means the computation is recursive and results in text collected from all the elements in the <code>current node</code>'s subtree, no matter how deep it is. However, any given descendant [=nodes|node's=] text alternative can result from higher precedent markup described in steps B through D above, where "Namefrom: author" attributes provide the text alternative for the entire subtree. </p>
499-
</details></div>
491+
</div>
500492
</li>
501493
<li id="comp_text_node" name="step2G"><em>Text Node:</em> Otherwise, if the <code>current node</code> is a Text [=Node=], return its textual contents.</li>
502494
<li id="comp_recursive_name_from_content" name="step2H"><em>Recursive Name From Content:</em> Otherwise, if the <code>current node</code> is a descendant of an element whose <a class="termref">Accessible Name</a> or <a class="termref">Accessible Description</a> is being computed, and contains descendants, proceed to <a href="#comp_name_from_content_reset">Name From Content Reset</a>.</li>
503495
<li id="comp_tooltip" name="step2I"><em>Tooltip:</em> Otherwise, if the <code>current node</code> has a <a class="termref">Tooltip attribute</a>, return its value.
504-
<div><details>
505-
<summary>Comment:</summary>
496+
<div class="note">
506497
<p>Tooltip attributes are used only if nothing else, including subtree content, has provided results. </p>
507-
</details></div>
498+
</div>
508499
</li>
509500
<li id="comp_append">Append a space character and the <code>result</code> of each step above to the <code>total accumulated text</code>.</li>
510501
</ol>

0 commit comments

Comments
 (0)