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
+22-21
Original file line number
Diff line number
Diff line change
@@ -294,7 +294,26 @@ <h4>Computation steps</h4>
294
294
</pre>
295
295
</details></div>
296
296
</li>
297
-
<liid="step2C">Otherwise, if computing a <aclass="termref" data-lt="accessible name">name</a>, and if the <code>current node</code> has an <code>aria-label</code><aclass="termref">attribute</a> whose value is not the empty string, nor, when trimmed of white space, is not the empty string:
297
+
<liid="step2C">Otherwise, if the <code>current node</code> is a control embedded within the label (e.g. the <code>label</code> element in HTML or any element directly referenced by <code>aria-labelledby</code>) for another <aclass="termref">widget</a>, where the user can adjust the embedded control's value, then include the embedded control as part of the text alternative in the following manner:
298
+
<ul>
299
+
<li>If the embedded control has role <aclass="role-reference" href="#textbox">textbox</a>, return its value.</li>
300
+
<li>If the embedded control has role menu <aclass="role-reference" href="#button">button</a>, return the text alternative of the button.</li>
301
+
<li>If the embedded control has role <aclass="role-reference" href="#combobox">combobox</a> or <aclass="role-reference" href="#listbox">listbox</a>, return the text alternative of the chosen <aclass="role-reference" href="#option">option</a>.</li>
302
+
<li>If the embedded control has role <aclass="role-reference" href="#range">range</a> (e.g., a <aclass="role-reference" href="#spinbutton">spinbutton</a> or <aclass="role-reference" href="#slider">slider</a>):
303
+
<ul>
304
+
<li>If the <code>aria-valuetext</code> property is present, return its value, </li>
305
+
<li>Otherwise, if the <code>aria-valuenow</code> property is present, return its value,</li>
306
+
<li>Otherwise, use the value as specified by a host language attribute. </li>
307
+
</ul>
308
+
</li>
309
+
</ul>
310
+
<div><details>
311
+
<summary>Example:</summary>
312
+
<p>Consider a <aclass="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 <aclass="role-reference" href="#textbox">textbox</a>, the complete label is "Flash the screen 5 times", e.g.: </p>
<liid="step2D">Otherwise, if computing a <aclass="termref" data-lt="accessible name">name</a>, and if the <code>current node</code> has an <code>aria-label</code><aclass="termref">attribute</a> whose value is not the empty string, nor, when trimmed of white space, is not the empty string:
298
317
<ul>
299
318
<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 as defined in step 2E, ignore <code>aria-label</code> and skip to rule 2E.</li>
300
319
<li>Otherwise, return the value of <code>aria-label</code>.</li>
@@ -315,31 +334,13 @@ <h4>Computation steps</h4>
315
334
</ul></code></pre>
316
335
</details></div>
317
336
</li>
318
-
<liid="step2D">Otherwise, if the <code>current node</code>'s native markup provides an <aclass="termref">attribute</a> (e.g. <code>title</code>) or <aclass="termref">element</a> (e.g. HTML <code>label</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>).
337
+
<liid="step2E">
338
+
Otherwise, if the <code>current node</code>'s native markup provides an <aclass="termref">attribute</a> (e.g. <code>title</code>) or <aclass="termref">element</a> (e.g. HTML <code>label</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>).
319
339
<div><details>
320
340
<summary>Comment:</summary>
321
341
<p>For example, in <abbrtitle="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 <abbrtitle="SVG2">SVG2</abbr>, the <code>desc</code> and <code>title</code> elements provide a description of their parent element. </p>
322
342
</details></div>
323
343
</li>
324
-
<liid="step2E">Otherwise, if the <code>current node</code> is a control embedded within the label (e.g. the <code>label</code> element in HTML or any element directly referenced by <code>aria-labelledby</code>) for another <aclass="termref">widget</a>, where the user can adjust the embedded control's value, then include the embedded control as part of the text alternative in the following manner:
325
-
<ul>
326
-
<li>If the embedded control has role <aclass="role-reference" href="#textbox">textbox</a>, return its value.</li>
327
-
<li>If the embedded control has role menu <aclass="role-reference" href="#button">button</a>, return the text alternative of the button.</li>
328
-
<li>If the embedded control has role <aclass="role-reference" href="#combobox">combobox</a> or <aclass="role-reference" href="#listbox">listbox</a>, return the text alternative of the chosen <aclass="role-reference" href="#option">option</a>.</li>
329
-
<li>If the embedded control has role <aclass="role-reference" href="#range">range</a> (e.g., a <aclass="role-reference" href="#spinbutton">spinbutton</a> or <aclass="role-reference" href="#slider">slider</a>):
330
-
<ul>
331
-
<li>If the <code>aria-valuetext</code> property is present, return its value, </li>
332
-
<li>Otherwise, if the <code>aria-valuenow</code> property is present, return its value,</li>
333
-
<li>Otherwise, use the value as specified by a host language attribute. </li>
334
-
</ul>
335
-
</li>
336
-
</ul>
337
-
<div><details>
338
-
<summary>Example:</summary>
339
-
<p>Consider a <aclass="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 <aclass="role-reference" href="#textbox">textbox</a>, the complete label is "Flash the screen 5 times", e.g.: </p>
<liid="step2F">Otherwise, if the <code>current node's</code><aclass="termref">role</a> allows <aclass="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 <aclass="termref">element</a> (e.g. <code>label</code> in HTML), or is a descendant of a native host language text alternative <aclass="termref">element</a>:
344
345
<ol>
345
346
<liid="step2F.i">Set the <code>accumulated text</code> to the empty string.</li>
0 commit comments