Skip to content

Commit

Permalink
Update accessible name steps for optgroup
Browse files Browse the repository at this point in the history
revised to incorporate latest decisions on how the naming/desc should work
  • Loading branch information
scottaohara authored Dec 11, 2024
1 parent e543559 commit 3a08912
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions html-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16162,11 +16162,11 @@ <h4>`optgroup` Element Accessible Name Computation</h4>
</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 use the rendered value of that attribute.
<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 in the accessibility tree.
</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 in the accessibility tree.
If the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is still empty, and there is no child `legend` element, then:
if the `optgroup` element has a <a data-cite="html/form-elements.html#attr-optgroup-label">label</a> attribute use the value of that attribute, which renders as the visible label of the `optgroup`.
</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.
Expand Down Expand Up @@ -16379,11 +16379,14 @@ <h3>Accessible Description Computation</h3>
<li>
an `optgroup` element which has a visible label rendered by its `label` attribute, a <a href="https://dom.spec.whatwg.org/#concept-tree-child">child</a> `legend` element, or both:
<ol>
<li>use the value of the `label` attribute if it was not used as the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a></li>
<li>use the <a data-cite="accname-1.2/#mapping_additional_nd_te">text equivalent computation</a> of the subtree of the first `legend` element if it was not used as the
<a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>.</li>
<li>or if both the `label` attribute and `legend` element were used, and their concatenate the <a data-cite="accname-1.2/#mapping_additional_nd_te">text equivalent computation</a> of each by DOM order, delimited by spaces,
if neither were used as the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>, and so long as the values of text equivalent computation of each do not match.</li>
<li>
use the value of the `label` attribute if it was not used as the
<a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>
</li>
<li>
or use the <a data-cite="accname-1.2/#mapping_additional_nd_te">text equivalent computation</a> of the subtree of the
first `legend` element if it was not used as the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>.
</li>
</ol>
</li>
<li>
Expand Down

0 comments on commit 3a08912

Please sign in to comment.