From 0efae20da978915acc747ae5aef63a2e9deb4d45 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 11 May 2023 12:39:07 -0400 Subject: [PATCH 01/15] contextual role concept proposal closes #375 The purpose of this proposal is both to resolve the issue that "scoped" was an undefined term that was used to indicate when certain elements would expose particular ARIA roles or not. However, in the year of noodling on this, other activities to revise what "owned" means in ARIA, the idea of a minimum role, as well as the fact there were other elements in HTML that have "scoped" or "contextual roles" that are based on heuristics, rather than defined standards, became relevant. A change to hopefully help simplify the implementations of contextual roles is that this proposal is aiming to tie the role of an element based on its a11y tree ancestry, rather than based on specific HTML elements in the DOM. This PR represents the initial draft of the proposal. Other work to explicitly call out the elements that have contextual roles, what roles they need to adjust to, and other wording revisions to replace "scoped" with the new term would still need to be made. --- html-aam/index.html | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/html-aam/index.html b/html-aam/index.html index 7cfffbaa7..c1b3530ac 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -210,6 +210,70 @@

Exposing HTML Features That Do Not Directly Map to Accessibility APIs

API properties in the [[core-aam-1.2]].

+
+

Exposing HTML Features With Contextual Roles

+

+ An element with a contextual role is one whose implicit WAI-ARIA role semantics are based on its anestral accessibility tree relationship to another element or elements. Or, an element whose computed role is reliant on whether the element has been provided an accessible name. +

+

+ For instance, an element that is an accessibility child of its required accessibility parent would expose a computed role that was + appropriate for this context. Where the same element might be used in another context with a different accessibility parent, and would therefore expose a computed role + appropriate for that context. +

+

+ When the conditions for an element's contextual role are not met, it will commonly expose a computed role of `generic` or with a minimum role, if applicable. +

+
+

Previously, the concept of a contextual role was loosely referred to as an element's "scoped" relationship to another element.

+
+
+

+ A li element has an implicit WAI-ARIA role mapping of listitem only when the element is an accessibility child of a + menu, ol or ul element that has not had its `list` role mapping suppressed. +

+
<ul>
+        <li>...</li> <!-- role=listitem -->
+      </ul> 
+      <article>
+        ...
+        <li>...</li> <!-- not role=listitem -->
+        ...
+
+
+

+ An aside element has an implicit WAI-ARIA role mapping of complementary only when the element is an accessibility child of + the body or main elements, or if the aside has been provided an accessible name. +

+
<body>
+        ...
+        <main>
+          ...
+          <article>
+            <aside>...</aside> <!-- not role=complementary -->
+            ...
+            <aside aria-label=named>...</aside> <!-- role=complementary -->
+          </article>
+          ...
+          <aside>...</aside> <!-- role=complementary -->
+        </main>
+        <aside>...</aside> <!-- role=complementary -->
+        ...
+        <footer>
+          ...
+          <aside>...</aside> <!-- not role=complementary -->
+        </footer>
+
+ +
+

A section element has an implicit WAI-ARIA role mapping of region only when the element is provided an accessible name.

+ +
<section title="accessible name">...</section> <!-- role=region -->
+      ...
+      <section aria-label="accessible name">...</section> <!-- role=region -->
+      ...
+      <section>...</section> <!-- not role=region -->
+
+

HTML Element Role Mappings