From 6f219790d1503fd27e59e7be35e87806fafebcc6 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 30 Oct 2024 17:51:28 -0400 Subject: [PATCH 1/3] Update: option element mapping table This PR does a few things: 1. Adds text indicating that UAs should calculate the x of y position of options similar to radio buttons (this is what happens now, but was not specified) 2. Re: the above mentioned x of y (aria-posinset / aria-setsize) for options, the radio button text that this was pulled from had a few wording updates to keep consistency. 3. adds UA MAY to comments of option, indicating what could be done to correct for invalid nesting of interactive elements within options (per upcoming customizable select where this scenario could occur) --- html-aam/index.html | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index ca3f951e6..6fd0d4388 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -3851,10 +3851,10 @@

`input` (`type` attribute in th [[wai-aria-1.2]] `radio` role, with the `aria-checked` state set to "true" if the element's - checkedness is true, or "false" otherwise. With - `aria-setsize` value reflecting number of `type=radio input` elements within the + checkedness is true, or "false" otherwise. + Expose an `aria-setsize` value reflecting number of `type=radio input` elements within the radio button group - and `aria-posinset` value reflecting the elements position within the + and an `aria-posinset` value reflecting the `type=radio input` element's position within the radio button group. @@ -5413,9 +5413,9 @@

`option` (in a list of options or re HTML Specification `option` - (in a list of options or represents a suggestion in a `datalist`) + + (in a list of options or represents a suggestion in a `datalist`) + @@ -5423,6 +5423,10 @@

`option` (in a list of options or re `option` role, with the `aria-selected` state set to "true" if the element's selectedness is true, or "false" otherwise. + Expose an `aria-setsize` value reflecting the number of `option` elements within the + list of options + and an `aria-posinset` value reflecting the `option` element's position within the + list of options. @@ -5458,7 +5462,10 @@

`option` (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 accessibile name, role, states and properties of such an element when if it receives focus. + From a22f2866b7dfc96bc56608a26b197c98df7ed390 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 7 Nov 2024 16:40:13 -0500 Subject: [PATCH 2/3] add naming steps for option this commit also contains commented out content to address https://github.com/w3c/html-aam/issues/568 in a future PR --- html-aam/index.html | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/html-aam/index.html b/html-aam/index.html index 6fd0d4388..8cb50cb54 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -11705,6 +11705,10 @@

`label`

The target element of the `label` attribute has a `LabeledBy` property pointing to the element with the `label` attribute. Participates in name computation. + @@ -11719,7 +11723,12 @@

`label`

Comments - See Also: Accessible Name and Description: Computation and API Mappings 1.1 + + + @@ -16154,6 +16163,26 @@

`fieldset` Element Accessible Name Computation

  • Otherwise, there is no accessible name.
  • +
    +

    `option` Element Accessible Name Computation

    +
      +
    1. + 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. +
    2. +
    3. + If the accessible name is still empty, then: use the value of the `option` element's `label` attribute. +
    4. +
    5. Otherwise if no `label` attribute is specified use the `option` element subtree.
    6. +
    7. Otherwise use `title` attribute.
    8. +
    9. If none of the above yield a usable text string there is no accessible name.
    10. +
    +

    + 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

      @@ -16364,6 +16393,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. +
    1. Otherwise, use the flat string of the `title` attribute if it was not used as the accessible name for the element.
    2. From 2d790ae1eb67746c664112fdd5f47fb7acaabc14 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 7 Nov 2024 16:41:02 -0500 Subject: [PATCH 3/3] Update html-aam/index.html --- html-aam/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html-aam/index.html b/html-aam/index.html index 8cb50cb54..87a8578ad 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -5464,7 +5464,7 @@

      `option` (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 accessibile name, role, states and properties of such an element when if it receives focus. + expose the accessible name, role, states and properties of such an element when and if it receives focus.