From 64faad1c4f4d67b9745875b8d3a40034944acc47 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 17:24:00 -0400 Subject: [PATCH 1/5] Update: add mapping tables for customizable select Initial draft of select / button as child of a select mappings. --- html-aam/index.html | 78 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/html-aam/index.html b/html-aam/index.html index ca3f951e6..7c0639e0e 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1257,6 +1257,79 @@

`button`

+ +

`button` as a child of a `select` element

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTML Specification + `button` +
[[wai-aria-1.2]] + + +
Computed Role + +
+ MSAA + IAccessible2 + +sdfsddsaf +
UIA +
Use WAI-ARIA mapping
+
ATK +
Use WAI-ARIA mapping
+
AX +
Use WAI-ARIA mapping
+
Comments +

User agents MUST treat a `button` that is a child element of a `select` element as one item in the accessibility tree.

+

+ User agents MUST use the text equivalent computation of the subtree of the + `button` element as the exposed value of the `select` element. If the `button` contains no content, then there is no value to expose + for the collapsed state of the `select`. +

+

+ TBD: indicate that global html/aria attributes and html/aria attributes specific to buttons are not to be respected on a button that is a child of a select? Since the button/select are meant to be treated as one entity in the a11y tree, and the button's content is meant to be treated as the value for the select, and not the name of the select, it doesn't make much sense to treat this button as if it were actually a button... +

+

See also `select` (with NO `multiple` attribute and NO `size` attribute having value greater than `1`)

+
+

`canvas`

@@ -6339,7 +6412,10 @@

`select` (with NO `multiple

- +
Comments +

User agents MUST treat a `button` that is a child element of a `select` element as one item in the accessibility tree.

+

See also `button` element as a child of a `select` element.

+
From 235259399c8ec9f53ebb5f9797232f6fdbcccf6a Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 17:29:03 -0400 Subject: [PATCH 2/5] adding TODO note for select's picker --- html-aam/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/html-aam/index.html b/html-aam/index.html index 7c0639e0e..d538001c8 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6415,6 +6415,15 @@

`select` (with NO `multiple

User agents MUST treat a `button` that is a child element of a `select` element as one item in the accessibility tree.

See also `button` element as a child of a `select` element.

+ +
+ TODO: +

handling the role of the picker popup based on if it contains invalid descendents or not

+

the role of the picker should also be contingent on whether invalid elements have accessible objects that exist outside/as siblings to option elements or not. + If an invalid element merely encapsulates the allowed children of a select, then that invalid element should instead be treated as if it had a generic/none role, + rather than modifying the role of the picker. +

+
From 60f862fb0121d7d1b1fb14c9f646abc5709205c1 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 18:07:20 -0400 Subject: [PATCH 3/5] Update html-aam/index.html --- html-aam/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html-aam/index.html b/html-aam/index.html index d538001c8..b10626a6a 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1323,6 +1323,9 @@

`button` as a child of a `select` element

TBD: indicate that global html/aria attributes and html/aria attributes specific to buttons are not to be respected on a button that is a child of a select? Since the button/select are meant to be treated as one entity in the a11y tree, and the button's content is meant to be treated as the value for the select, and not the name of the select, it doesn't make much sense to treat this button as if it were actually a button... +
+
+ suggest ignoring accesskey, autofocus, contenteditable, draggable, inert, popover, tabindex, title

See also `select` (with NO `multiple` attribute and NO `size` attribute having value greater than `1`)

From c05f0e6f74f4ffb2b25fc08be013e628f955ff97 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Mon, 11 Nov 2024 13:10:04 -0500 Subject: [PATCH 4/5] update mappings for button part of customizable select --- html-aam/index.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index b10626a6a..14589690e 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1270,7 +1270,7 @@

`button` as a child of a `select` element

[[wai-aria-1.2]] - +
Not mapped. See comments.
Comments -

User agents MUST treat a `button` that is a child element of a `select` element as one item in the accessibility tree.

User agents MUST use the text equivalent computation of the subtree of the `button` element as the exposed value of the `select` element. If the `button` contains no content, then there is no value to expose for the collapsed state of the `select`.

+

+ Otherwise, user agents MUST treat the child `button` element of a `select` element as inert. The `select` and its child `button` are to be considered a single item + in the user agent's accessibility tree. +

- TBD: indicate that global html/aria attributes and html/aria attributes specific to buttons are not to be respected on a button that is a child of a select? Since the button/select are meant to be treated as one entity in the a11y tree, and the button's content is meant to be treated as the value for the select, and not the name of the select, it doesn't make much sense to treat this button as if it were actually a button... -
-
- suggest ignoring accesskey, autofocus, contenteditable, draggable, inert, popover, tabindex, title + As this `button` element is meant to be treated as inert, any use of global HTML or ARIA attributes, or attributes specific to the `button` element or ARIA's `button` role + would not be exposed to the user agent's accessibility API.

See also `select` (with NO `multiple` attribute and NO `size` attribute having value greater than `1`)

- - +

`canvas`

From 421f6686fbe9f08b4cf4509aa8d90158a9516d73 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 6 Feb 2025 17:49:03 -0500 Subject: [PATCH 5/5] Update accessibility guidelines for `select` and `button` elements --- html-aam/index.html | 49 ++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index 14589690e..b2238549b 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1316,19 +1316,20 @@

`button` as a child of a `select` element

@@ -6416,17 +6417,29 @@

`select` (with NO `multiple

Comments

- User agents MUST use the text equivalent computation of the subtree of the - `button` element as the exposed value of the `select` element. If the `button` contains no content, then there is no value to expose - for the collapsed state of the `select`. + User agents MUST treat the child `button` element of a `select` element as inert. + The `select` and its child `button` part are meant to be considered a single item to users and in the user agent's accessibility tree.

- Otherwise, user agents MUST treat the child `button` element of a `select` element as inert. The `select` and its child `button` are to be considered a single item - in the user agent's accessibility tree. + The text equivalent computation of the subtree of the + `button` element participates in the accessible value calculation of the `select` element. + See the `select` (with NO `multiple` attribute and NO `size` attribute having value greater than `1`) for more information. +

+

+ User agents MAY warn developers that the use of global HTML or ARIA attributes, or attributes specific to the `button` element or ARIA's `button` role are not expected to be used on a `button` element in this context.

- As this `button` element is meant to be treated as inert, any use of global HTML or ARIA attributes, or attributes specific to the `button` element or ARIA's `button` role - would not be exposed to the user agent's accessibility API. + As this `button` element is inert, any use of global HTML or ARIA attributes, or attributes specific to the `button` element or ARIA's `button` role are not exposed to the user agent's accessibility API.

-

See also `select` (with NO `multiple` attribute and NO `size` attribute having value greater than `1`)

Comments -

User agents MUST treat a `button` that is a child element of a `select` element as one item in the accessibility tree.

-

See also `button` element as a child of a `select` element.

+

To calculate the accessible value of a `select` element:

+
    +
  1. If `aria-valuetext` is specified on the `select` element, use the attribute's value, including the empty string.
  2. +
  3. Else if the is a `button` part, calcluate the accessible value from the text equivalent computation of the subtree of that element, even if it returns the empty string.
  4. +
  5. If the `select` element does not have an `aria-valuetext` attribute and does not contain a `button` part, then the accessible value is calculated from the accessible name of the selected `option` element.
  6. +
+ -
- TODO: -

handling the role of the picker popup based on if it contains invalid descendents or not

-

the role of the picker should also be contingent on whether invalid elements have accessible objects that exist outside/as siblings to option elements or not. - If an invalid element merely encapsulates the allowed children of a select, then that invalid element should instead be treated as if it had a generic/none role, - rather than modifying the role of the picker. -

-
+

The following text is still being refined

+

+ The calculated role of the customizable `select` element's popup picker is a `listbox`, by default.

+

+ If authors render invalid elements, in regard to the select element's content model, as descendants of the select element, and those invalid elements result in accessible objects being present as siblings in the accessibility tree to the valid descendent elements of the select, then user agents SHOULD expose the popup picker with the role of a modeless dialog.

+ +

+ In the event invalid elements are present, but are not rendered, then no user agent role repair is necessary.

+

+ In the event that invalid elements are present, but are empty, or are only used as wrapping elements for the valid descendent element's of a select, then user agents SHOULD ignore these elements in the accessibility tree. +

+ +

Treating the picker as a `dialog` can help inform users that content beyond the expected elements of a `listbox` popup are present, as they can then inspect the content of the dialog with their assistive technology to discover such content.

+ +

See also `button` element as a child of a `select` element.