From 4fbb93fe62719bd12f98038b72b7bf20c697c015 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 15:15:22 -0500 Subject: [PATCH 01/14] Update: change default role for custom elements closes #2303 This updates a custom element's default role to none to allow attribute reflection from the custom element parent to its internals. This change provides additional clarification about how a custom element can be provided a role by authors, and what caveats would change a custom element's default role of none, to another implicit minimum role. --- html-aam/index.html | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index 3941b0df8..e975f563a 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -226,7 +226,8 @@

HTML Element Role Mappings

specified which would require a more specific minimum role to be exposed.
  • - Where an element is indicated as having "No corresponding (WAI-ARIA) role", or is mapped to the `generic` role, user agents + Where an element is indicated as having "No corresponding (WAI-ARIA) role", or is mapped to the `generic` + or `none` roles, user agents MUST NOT expose the `aria-roledescription` property value in the accessibility tree unless the element has an explicit, conforming `role` attribute value which [[WAI-ARIA-1.2]] does not prohibit the use of `aria-roledescription`.
  • @@ -815,7 +816,19 @@

    autonomous custom element

    [[wai-aria-1.2]] - If the author assigned a conforming ARIA role using the `role` attribute, map to that role. Otherwise, the `generic` role. + +

    + If the author assigned a conforming ARIA role using the `role` attribute, + or by the custom element's internals, map to the specified role. +

    +

    + If the author assigned attributes that result in a minimum role, then map + to the minimum role (see comments. +

    +

    + Otherwise, the element maps to the `none` role. +

    + Computed Role @@ -850,7 +863,29 @@

    autonomous custom element

    Comments - + +

    + Along with the attributes defined in this specification that contribute to modifying an element's minimum role, + the following conditions will also alter a custom element's computed role, if an author has not otherwise specified an + explicit role for the element: +

    + +
    +

    The following is an exmaple of an author specifiying an ARIA relation on a custom element, with another element in the DOM.

    +
    +                    
    +                      <my-element aria-details=ex>...<my-element>
    +                      ...
    +                      <div id=ex> <!-- details for my-element --> </div>
    +                    
    +                  
    +
    + @@ -8680,7 +8715,7 @@

    `autofocus`

    Comments - Provides a minimum role of `group`. + Provides a minimum role of `group`. @@ -10171,7 +10206,7 @@

    `draggable`

    Comments - Provides a minimum role of `group`. + Provides a minimum role of `group`. From 8bde5fd365ea704d60ffd1b4b12399a4978fd9cd Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 15:50:16 -0500 Subject: [PATCH 02/14] fix typo / missing in-page link id --- html-aam/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index e975f563a..7e9a67181 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -823,7 +823,7 @@

    autonomous custom element

    If the author assigned attributes that result in a minimum role, then map - to the minimum role (see comments. + to the minimum role (see comments).

    Otherwise, the element maps to the `none` role. @@ -862,7 +862,7 @@

    autonomous custom element

    - Comments + Comments

    Along with the attributes defined in this specification that contribute to modifying an element's minimum role, From 9e6c5b2c9aefbaacb4c836e3f9a12f0d7286dd23 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 15:52:46 -0500 Subject: [PATCH 03/14] 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 7e9a67181..173a5c4d7 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -865,7 +865,7 @@

    autonomous custom element

    Comments

    - Along with the attributes defined in this specification that contribute to modifying an element's minimum role, + Along with the attributes defined in this specification that participate in modifying an element's minimum role, the following conditions will also alter a custom element's computed role, if an author has not otherwise specified an explicit role for the element:

    From d1fffc8d87f541c2f2f53050c0b32b0c29f62ff5 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 15:56:30 -0500 Subject: [PATCH 04/14] Update html-aam/index.html --- html-aam/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index 173a5c4d7..0edc122dc 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -877,8 +877,7 @@

    autonomous custom element

    The following is an exmaple of an author specifiying an ARIA relation on a custom element, with another element in the DOM.

    -
    -                    
    +                  
    
                           <my-element aria-details=ex>...<my-element>
                           ...
                           <div id=ex> <!-- details for my-element --> </div>
    
    From a3ee851e8993148e1752ae2513421fbaa3b37e4a Mon Sep 17 00:00:00 2001
    From: Scott O'Hara 
    Date: Fri, 22 Nov 2024 15:56:34 -0500
    Subject: [PATCH 05/14] Update html-aam/index.html
    
    ---
     html-aam/index.html | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/html-aam/index.html b/html-aam/index.html
    index 0edc122dc..cc637f037 100644
    --- a/html-aam/index.html
    +++ b/html-aam/index.html
    @@ -881,8 +881,7 @@ 

    autonomous custom element

    <my-element aria-details=ex>...<my-element> ... <div id=ex> <!-- details for my-element --> </div> -
    -
    +
    From 584d9527c0264b68edb13f7c985b1b160a57480b Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 16:12:50 -0500 Subject: [PATCH 06/14] update per feedback/discussion about referenced elements --- html-aam/index.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index cc637f037..d6d2c1e2e 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -871,16 +871,26 @@

    autonomous custom element

    • if the custom element is focusable: expose as `group` role
    • -
    • if the custom element has an `aria-live` or `aria-owns` attribute: expose as `generic` role
    • +
    • if the custom element has an `aria-live` attribute: expose as `generic` role
    • if element internals are used to set a global ARIA property: expose as `generic` role
    • -
    • if an author specifies an ARIA relation via an element attribute: expose `generic` role
    • +
    • if an author specifies an ARIA attribute that creates a relation with another element (via IDRef): expose `generic` role
    -

    The following is an exmaple of an author specifiying an ARIA relation on a custom element, with another element in the DOM.

    +

    The following are exmaples of an author specifiying a relationships between custom elements and other elements in the DOM.

    
    -                      <my-element aria-details=ex>...<my-element>
    +                      <my-element aria-details=ex>...</my-element>
                           ...
                           <div id=ex> <!-- details for my-element --> </div>
    +                      ...
    +                      <ex-ample aria-owns=u>...</ex-ample>
    +                      ...
    +                      <div id=u> <!-- becomes the last a11y child of ex-ample --> </div>
    +
    +                      <id-lement> ... </id-lement>
    +                      <script>
    +                        ...
    +                        document.querySelector('id-lement').ariaDescribedby = anotherEl;
    +                      </script>
                       
    From 88b0dc0237df1e746cea3af7e43d9dfbc4f38386 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 16:20:08 -0500 Subject: [PATCH 07/14] Update index.html --- 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 d6d2c1e2e..9ffbe45ef 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -873,24 +873,24 @@

    autonomous custom element

  • if the custom element is focusable: expose as `group` role
  • if the custom element has an `aria-live` attribute: expose as `generic` role
  • if element internals are used to set a global ARIA property: expose as `generic` role
  • -
  • if an author specifies an ARIA attribute that creates a relation with another element (via IDRef): expose `generic` role
  • +
  • if an author specifies an ARIA attribute that creates a relation with another element: expose `generic` role
  • The following are exmaples of an author specifiying a relationships between custom elements and other elements in the DOM.

    
    -                      <my-element aria-details=ex>...</my-element>
    -                      ...
    -                      <div id=ex> <!-- details for my-element --> </div>
    -                      ...
    -                      <ex-ample aria-owns=u>...</ex-ample>
    -                      ...
    -                      <div id=u> <!-- becomes the last a11y child of ex-ample --> </div>
    +   <my-element aria-details=ex>...</my-element>
    +     ...
    +    <div id=ex> <!-- details for my-element --> </div>
    +    ...
    +    <ex-ample aria-owns=u>...</ex-ample>
    +      ...
    +    <div id=u> <!-- becomes the last a11y child of ex-ample --> </div>
     
    -                      <id-lement> ... </id-lement>
    -                      <script>
    -                        ...
    -                        document.querySelector('id-lement').ariaDescribedby = anotherEl;
    -                      </script>
    +    <id-lement> ... </id-lement>
    +    <script>
    +      ...
    +      document.querySelector('id-lement').ariaDescribedby = anotherEl;
    +    </script>
                       
    From 90cbd15a02d4d0377c4264bb8434f751085f4a7b Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 16:32:45 -0500 Subject: [PATCH 08/14] 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 9ffbe45ef..322c1aad7 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -873,7 +873,7 @@

    autonomous custom element

  • if the custom element is focusable: expose as `group` role
  • if the custom element has an `aria-live` attribute: expose as `generic` role
  • if element internals are used to set a global ARIA property: expose as `generic` role
  • -
  • if an author specifies an ARIA attribute that creates a relation with another element: expose `generic` role
  • +
  • if an author specifies an ARIA attribute on the custom element that creates a relation with another element: expose `group` role
  • The following are exmaples of an author specifiying a relationships between custom elements and other elements in the DOM.

    From 89b18fb11a867bda3d1f89d6d57603799d8225ab Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 16:33:00 -0500 Subject: [PATCH 09/14] 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 322c1aad7..fffc68867 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -889,7 +889,7 @@

    autonomous custom element

    <id-lement> ... </id-lement> <script> ... - document.querySelector('id-lement').ariaDescribedby = anotherEl; + document.querySelector('id-lement').ariaDescribedbyByElements = [ descElement ]; </script>
    From ec41dfc15220724ad13a7fed45b34aea785dac55 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 16:51:13 -0500 Subject: [PATCH 10/14] or else if otherwise sure? --- html-aam/index.html | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index fffc68867..e192e9a55 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -870,29 +870,11 @@

    autonomous custom element

    explicit role for the element:

      -
    • if the custom element is focusable: expose as `group` role
    • -
    • if the custom element has an `aria-live` attribute: expose as `generic` role
    • -
    • if element internals are used to set a global ARIA property: expose as `generic` role
    • -
    • if an author specifies an ARIA attribute on the custom element that creates a relation with another element: expose `group` role
    • +
    • if the custom element is focusable: expose the `group` role
    • +
    • else if an author specifies an ARIA attribute on the custom element that creates a relation with another element: expose the `group` role
    • +
    • else if the custom element has an `aria-live` attribute: expose the `generic` role
    • +
    • else if element internals are used to set a global ARIA property: expose the `generic` role
    -
    -

    The following are exmaples of an author specifiying a relationships between custom elements and other elements in the DOM.

    -
    
    -   <my-element aria-details=ex>...</my-element>
    -     ...
    -    <div id=ex> <!-- details for my-element --> </div>
    -    ...
    -    <ex-ample aria-owns=u>...</ex-ample>
    -      ...
    -    <div id=u> <!-- becomes the last a11y child of ex-ample --> </div>
    -
    -    <id-lement> ... </id-lement>
    -    <script>
    -      ...
    -      document.querySelector('id-lement').ariaDescribedbyByElements = [ descElement ];
    -    </script>
    -                  
    -
    From 07fa950607384a7661356df77e845a0ecbf98e71 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 22 Nov 2024 17:09:58 -0500 Subject: [PATCH 11/14] combining things pull comments into role table cell combine custom elements and form associated custom elements into a single mapping table --- html-aam/index.html | 94 +++++++++------------------------------------ 1 file changed, 18 insertions(+), 76 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index e192e9a55..3aaf0714b 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -805,29 +805,33 @@

    `audio`

    -

    autonomous custom element

    +

    + autonomous custom elements + and + form-associated custom elements +

    @@ -862,20 +866,8 @@

    autonomous custom element

    - - + +
    HTML Specification autonomous custom element + and + form-associated custom element
    [[wai-aria-1.2]] -

    - If the author assigned a conforming ARIA role using the `role` attribute, - or by the custom element's internals, map to the specified role. -

    -

    - If the author assigned attributes that result in a minimum role, then map - to the minimum role (see comments). -

    -

    - Otherwise, the element maps to the `none` role. -

    +
      +
    • If the author assigned a conforming ARIA role using the `role` attribute, or by the custom element's internals, map to the specified role.
    • +
    • else if the author assigned HTML attributes that result in a minimum role, then map to the minimum role.
    • +
    • else if the custom element is focusable: expose the `group` role
    • +
    • else if an author specifies an ARIA attribute on the custom element that creates a relation with another element: expose the `group` role
    • +
    • else if the custom element has an `aria-live` attribute: expose the `generic` role
    • +
    • else if element internals are used to set a global ARIA property: expose the `generic` role.
    • +
    • Otherwise, the element maps to the `none` role.
    • +
    Comments -

    - Along with the attributes defined in this specification that participate in modifying an element's minimum role, - the following conditions will also alter a custom element's computed role, if an author has not otherwise specified an - explicit role for the element: -

    -
      -
    • if the custom element is focusable: expose the `group` role
    • -
    • else if an author specifies an ARIA attribute on the custom element that creates a relation with another element: expose the `group` role
    • -
    • else if the custom element has an `aria-live` attribute: expose the `generic` role
    • -
    • else if element internals are used to set a global ARIA property: expose the `generic` role
    • -
    -
    Comments
    @@ -2549,56 +2541,6 @@

    `form`

    -

    form-associated custom element

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    HTML Specification - form-associated custom element -
    [[wai-aria-1.2]]If the author assigned a conforming ARIA role using the `role` attribute, map to that role. Otherwise, the `generic` role.
    Computed Role
    Use WAI-ARIA mapping
    - MSAA + IAccessible2 - -
    Use WAI-ARIA mapping
    -
    UIA -
    Use WAI-ARIA mapping
    -
    ATK -
    Use WAI-ARIA mapping
    -
    AX -
    Use WAI-ARIA mapping
    -
    Comments

    `h1`, `h2`, `h3`, `h4`, `h5`, and `h6`

    From 67ce53631b9cc3d2db340f1129d9eaee956cf2e3 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 27 Nov 2024 11:12:00 -0500 Subject: [PATCH 12/14] add in no shadow root use cae update wording to be consistent between steps --- html-aam/index.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index 3aaf0714b..f7cb31fd5 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -824,13 +824,14 @@

    From b37c79b83eed353f92d6655a42db7dd260b86e85 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 17 Dec 2024 15:59:47 -0500 Subject: [PATCH 13/14] Update html-aam/index.html Co-authored-by: James Craig --- 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 f7cb31fd5..937e295f0 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -824,7 +824,7 @@

    [[wai-aria-1.2]]
      -
    • If the author assigned a conforming ARIA role using the `role` attribute, or by the custom element's internals, map to the specified role.
    • -
    • else if the author assigned HTML attributes that result in a minimum role, then map to the minimum role.
    • -
    • else if the custom element is focusable: expose the `group` role
    • -
    • else if an author specifies an ARIA attribute on the custom element that creates a relation with another element: expose the `group` role
    • -
    • else if the custom element has an `aria-live` attribute: expose the `generic` role
    • -
    • else if element internals are used to set a global ARIA property: expose the `generic` role.
    • -
    • Otherwise, the element maps to the `none` role.
    • +
    • If the author assigned a conforming ARIA role using the `role` attribute, or by the custom element's internals: map to the specified role.
    • +
    • else if the author assigned HTML attributes that result in a minimum role: map to the minimum role.
    • +
    • else if the custom element is focusable: map to the `group` role
    • +
    • else if an author specifies a global ARIA attribute on the custom element that creates a relation with another element: map to the `group` role
    • +
    • else if the custom element has no attached shadow root: map to the `generic` role
    • +
    • else if the custom element has an `aria-live` attribute: map to the `generic` role
    • +
    • else if element internals are used to set a global ARIA property: map to the `generic` role.
    • +
    • Otherwise, the custom element maps to the `none` role.
    [[wai-aria-1.2]]
      -
    • If the author assigned a conforming ARIA role using the `role` attribute, or by the custom element's internals: map to the specified role.
    • +
    • If the author assigned a conforming role using the `role` attribute, or by the custom element's internals: map to the specified role.
    • else if the author assigned HTML attributes that result in a minimum role: map to the minimum role.
    • else if the custom element is focusable: map to the `group` role
    • else if an author specifies a global ARIA attribute on the custom element that creates a relation with another element: map to the `group` role
    • From 691877f105a86bf060d38580dfc999fa29daef49 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 17 Dec 2024 16:02:26 -0500 Subject: [PATCH 14/14] Update html-aam/index.html Co-authored-by: James Craig --- 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 937e295f0..bcb00ea5c 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -827,7 +827,7 @@

    • If the author assigned a conforming role using the `role` attribute, or by the custom element's internals: map to the specified role.
    • else if the author assigned HTML attributes that result in a minimum role: map to the minimum role.
    • else if the custom element is focusable: map to the `group` role
    • -
    • else if an author specifies a global ARIA attribute on the custom element that creates a relation with another element: map to the `group` role
    • +
    • else if an author specifies a global ARIA attribute on the custom element that creates a relation with another element: map to the `group` role
    • else if the custom element has no attached shadow root: map to the `generic` role
    • else if the custom element has an `aria-live` attribute: map to the `generic` role
    • else if element internals are used to set a global ARIA property: map to the `generic` role.