Skip to content

Commit

Permalink
naming steps for optgroup
Browse files Browse the repository at this point in the history
open question in whatwg/html#10586 (comment) about what should take priority - legend or optgroup's label attr.

if both end up being allowed / render - then one of these could be added to the accDescription computation - instead of ignoring one or combining them into one long name.
  • Loading branch information
scottaohara authored Oct 22, 2024
1 parent ebdf3a6 commit 5fcc764
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions html-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16152,6 +16152,26 @@ <h4>`fieldset` Element Accessible Name Computation</h4>
<li>Otherwise, there is no <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>.</li>
</ol>
</section>
<section>
<h4>`optgroup` Element Accessible Name Computation</h4>
<ol>
<li>
If the `optgroup` element has an <a data-cite="wai-aria-1.2/#aria-label">`aria-label`</a> or an <a data-cite="wai-aria-1.2/#aria-labelledby">`aria-labelledby`</a> attribute the
<a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is to be calculated using the algorithm defined in
<a href="" class="accname">Accessible Name and Description: Computation and API Mappings</a>.
</li>
<li>
If the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is still empty, then: if the `optgroup` element has a
<a href="https://dom.spec.whatwg.org/#concept-tree-child">child</a> that is a <code>legend</code> element, then use the subtree of the first such element.
</li>
<li>
If the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is still empty, then: if the `optgroup` element has a
<a data-cite="html/form-elements.html#attr-optgroup-label">label</a> attribute, then use that attribute.
</li>
<li>If the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is still empty, then:, if the `optgroup` element has a `title` attribute, then use that attribute.</li>
<li>Otherwise, there is no <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>.</li>
</ol>
</section>
<section>
<h4>`output` Element Accessible Name Computation</h4>
<ol>
Expand Down

0 comments on commit 5fcc764

Please sign in to comment.