From a0ab97409b269a7e3c67d0820ab4eed096599dcd Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 17:24:00 -0400 Subject: [PATCH 01/18] 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 cf427a131..edc82ec49 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1293,6 +1293,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`

@@ -6420,7 +6493,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 cf8ff979f15a7a0790c85b4b2e9d4599e32b75cc Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 17:29:03 -0400 Subject: [PATCH 02/18] 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 edc82ec49..63c39532a 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6496,6 +6496,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 8ba47a386c50563df731af08e20dae4fb71d542c Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 18:07:20 -0400 Subject: [PATCH 03/18] 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 63c39532a..c620772d3 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1359,6 +1359,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 beda61aa4d25c304c74dfebcadde5c8dc08a4fa4 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Mon, 11 Nov 2024 13:10:04 -0500 Subject: [PATCH 04/18] 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 c620772d3..a38a08c1c 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1306,7 +1306,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 9c3629082cd16a1d07ed8849ffef57e72d29efb6 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 6 Feb 2025 17:49:03 -0500 Subject: [PATCH 05/18] 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 a38a08c1c..83d74faeb 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1352,19 +1352,20 @@

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

@@ -6497,17 +6498,29 @@

`select` (with NO `multiple

From 843ba8a0e10cd684be792500aa2fcf6ce49d392f Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 18 Feb 2025 13:06:50 -0500 Subject: [PATCH 06/18] Add example of UA stylesheet for button --- 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 83d74faeb..e52e0f299 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1352,7 +1352,7 @@

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

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.

Comments

- User agents MUST treat the child `button` element of a `select` element as inert. + User agents MUST treat the child `button` element of a `select` element as inert. For instance, the UA stylesheet applying `interactivity: inert` to the button part. 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.

From e8d5485722a18f9b908daa02a21e76b14732be7a Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 18 Feb 2025 13:14:56 -0500 Subject: [PATCH 07/18] Update data-cite attribute to data-x attribute --- 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 e52e0f299..ea5359cf8 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1352,7 +1352,7 @@

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

Comments

- User agents MUST treat the child `button` element of a `select` element as inert. For instance, the UA stylesheet applying `interactivity: inert` to the button part. + User agents MUST treat the child `button` element of a `select` element as inert. For instance, the UA stylesheet applying 'interactivity: inert' to the button part. 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.

From 709675e89d9000bb0b172afca5b1e9f1aae9fe8b Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 18 Feb 2025 13:27:23 -0500 Subject: [PATCH 08/18] Refine text and add example code --- html-aam/index.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index ea5359cf8..78f584154 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6510,14 +6510,30 @@

`select` (with NO `multiple

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.

+ If authors include invalid elements (according to the 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 dialog in the modeless state.

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. + In the event that invalid elements are present, but are empty, include only whitespace, 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.

+
+

In the following example the declared `article` elements are invalid per the `select` element's content model. But as each `article` element is empty, contains only whitespace, or contains only valid `option` elements, the `article` element's role can be ignored in the user agent's accessibility tree:

+ +

+<select>
+  
+  
+
+
+
+</select> +
+
+

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.

From 56a6bcc7df2c0a7e5772267edadb818daf12c483 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 18 Feb 2025 13:34:38 -0500 Subject: [PATCH 09/18] 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 78f584154..cd36367d5 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1352,7 +1352,7 @@

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

Comments

- User agents MUST treat the child `button` element of a `select` element as inert. For instance, the UA stylesheet applying 'interactivity: inert' to the button part. + User agents MUST treat the child `button` element of a `select` element as inert. For instance, the UA stylesheet applying 'interactivity: inert' to the button part. 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.

From 084e51f6ec9826290b5d1e384b33ab654017e45e Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 14 May 2025 08:37:14 -0400 Subject: [PATCH 10/18] Update html-aam/index.html --- html-aam/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index cd36367d5..a52ec3e24 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6523,13 +6523,13 @@

`select` (with NO `multiple

 <select>
-  
-  
-
-
-
+ <button><selectedcontent></selectedcontent></button> + <article> + <article> + <option>item 1 + <option>item 2 + </article> + <article> </article> </select>
From a1a5aa1d794e193b86550d1d2e7d8be33a1d9266 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 23 May 2025 14:48:36 -0400 Subject: [PATCH 11/18] fix typo --- 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 a52ec3e24..817232c8b 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6501,7 +6501,7 @@

`select` (with NO `multiple

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. Else if there 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.
  6. 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.
From e7aa61c4d5db6c71a10cd11d93719339ddbf886f Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 29 May 2025 14:03:20 -0400 Subject: [PATCH 12/18] 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 817232c8b..a6916329e 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -1352,7 +1352,7 @@

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

Comments

- User agents MUST treat the child `button` element of a `select` element as inert. For instance, the UA stylesheet applying 'interactivity: inert' to the button part. + User agents 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.

From 8e6a883bc7150e7151613355fe0f591f856967c9 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 29 May 2025 14:05:44 -0400 Subject: [PATCH 13/18] 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 a6916329e..d7dcf74f4 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6501,7 +6501,7 @@

`select` (with NO `multiple

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 there 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. Else if there is a `button` part, calculate the accessible value from a non-empty string text equivalent computation of the subtree of that element.
  6. 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.
From 181c9cfdb5d0aa8a6f9c05e2a68100cc8e3a4b51 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 29 May 2025 14:08:12 -0400 Subject: [PATCH 14/18] 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 d7dcf74f4..7b5f65805 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6502,7 +6502,7 @@

`select` (with NO `multiple
  1. If `aria-valuetext` is specified on the `select` element, use the attribute's value, including the empty string.
  2. Else if there is a `button` part, calculate the accessible value from a non-empty string text equivalent computation of the subtree of that element.
  3. -
  4. 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.
  5. +
  6. If the `select` element does not have an `aria-valuetext` attribute and has not calculated a usable value from its button part, then the accessible value is calculated from the accessible name of the selected `option` element, even if the accessible name of the selected `option` is the empty string.
From 8ba475e93c1c5b824e06de073947d187a613af50 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 29 May 2025 14:10:27 -0400 Subject: [PATCH 15/18] 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 7b5f65805..8a6b3e892 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6510,7 +6510,7 @@

`select` (with NO `multiple

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

- If authors include invalid elements (according to the 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 dialog in the modeless state.

+ If authors include invalid elements (according to the 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 `dialog` in the modeless state.

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

From dce5a17390db53926e8dd479d8bb3b44f2caf379 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 29 May 2025 14:14:09 -0400 Subject: [PATCH 16/18] Apply suggestions from code review --- html-aam/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index 8a6b3e892..a5dc26425 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6524,12 +6524,12 @@

`select` (with NO `multiple

 <select>
   <button><selectedcontent></selectedcontent></button>
-  <article>
-  <article>
+  <article> </article> 
+  <article> 
     <option>item 1
     <option>item 2
   </article>
-  <article> </article>
+  <article hidden> foo </article> 
 </select>
                   
From 203e00857ecd0b37070f1f4b9ea8c32fbf9db221 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 29 May 2025 14:14:59 -0400 Subject: [PATCH 17/18] 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 a5dc26425..2208d8be4 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6524,7 +6524,7 @@

`select` (with NO `multiple

 <select>
   <button><selectedcontent></selectedcontent></button>
-  <article> </article> 
+  <article> </article> 
   <article> 
     <option>item 1
     <option>item 2

From df2b946531040b893a26e77e492f2670af93570e Mon Sep 17 00:00:00 2001
From: Scott O'Hara 
Date: Thu, 29 May 2025 14:15:36 -0400
Subject: [PATCH 18/18] Update html-aam/index.html

---
 html-aam/index.html | 1 -
 1 file changed, 1 deletion(-)

diff --git a/html-aam/index.html b/html-aam/index.html
index 2208d8be4..3da2d31a5 100644
--- a/html-aam/index.html
+++ b/html-aam/index.html
@@ -6506,7 +6506,6 @@ 

`select` (with NO `multiple -

The following text is still being refined

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