(in a list of options or re
Comments |
- |
+
+ To repair instance of invalid nesting of interactive or keyboard focusable content within an `option` element, user agents MAY
+ expose the accessible name, role, states and properties of such an element when and if it receives focus.
+ |
@@ -11725,7 +11732,8 @@ `label`
Element(s) |
- `optgroup`; `option`;
+ `optgroup`;
+ `option`;
`track`
|
@@ -11746,8 +11754,7 @@ `label`
UIA |
- The target element of the `label` attribute has a `LabeledBy` property pointing to the element with the `label` attribute. Participates in
- name computation.
+
|
@@ -11762,7 +11769,20 @@ `label`
Comments |
- See Also: Accessible Name and Description: Computation and API Mappings |
+
+
+ The `label` attribute behaves differently when declared on an `optgroup` element compared to an `option` element.
+ If the `label` attribute is declared on an `option` element, its value will become the rendered label of the `option` element, even if the `option` element has child elements.
+ If the `label` attribute is declared on an `optgroup` element that is a descendant of a customizable `select` element, and that `optgroup` has a child `legend` element, then the `legend` element takes priority. The `label` attribute's value will not be rendered or exposed to the accessibility tree as the name of the `opgroup`.
+
+
+
+ |
@@ -16198,6 +16218,32 @@ `fieldset` Element Accessible Name Computation
Otherwise, there is no accessible name.
+
+ `option` Element Accessible Name Computation
+
+ -
+ If the `option` element has an `aria-label`
+ or an `aria-labelledby` attribute the
+ accessible name is to be calculated using the algorithm defined in
+ Accessible Name and Description: Computation and API Mappings.
+
+ -
+ If the accessible name is still empty: use the value of the `option` element's `label` attribute.
+
+ -
+ If no `label` attribute is specified: use the text equivalent computation of the `option` element's subtree.
+
+ -
+ Otherwise:
+ use the value of the element's `title` attribute.
+
+ - If none of the above yield a usable text string there is no accessible name.
+
+ An `option` element's `label` attribute will override the rendering of an `option` element's author defined descendents. Instead, the
+ value of the element's `label` attribute is used as the visible text label for the `option`.
+
+
`output` Element Accessible Name Computation
@@ -16408,6 +16454,10 @@ Accessible Description Computation
an `input` element whose `type` attribute is the `button`, `submit` or `reset` state, and it has a `value` attribute, then use the flat string of the attribute if it was not used as
the accessible name.
+
- Otherwise, use the flat string of the `title` attribute if it was not used as the accessible name for the element.