Skip to content

Commit

Permalink
update accname 'flash screen' example to use native clickable label e…
Browse files Browse the repository at this point in the history
…lement (#206)

Co-authored-by: James Nurthen <[email protected]>
  • Loading branch information
cookiecrook and jnurthen authored Nov 3, 2023
1 parent 114fe15 commit 681094c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,11 @@ <h4>Computation steps</h4>
</li>
</ol>
<aside class="example">
<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>
<pre class="highlight">
<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>
</pre>
<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 input field has the value "5", the complete label is "Flash the screen 5 times", e.g.:</p>
<pre class="highlight"><code>&lt;label for="flash"&gt;
&lt;input type="checkbox" id="flash"&gt;
Flash the screen &lt;span tabindex="0" role="textbox" aria-label="number of times" contenteditable&gt;5&lt;/span&gt; times.
&lt;/label&gt;</code></pre>
</aside>
</li>
<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:
Expand Down

0 comments on commit 681094c

Please sign in to comment.