You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+29-2Lines changed: 29 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -344,8 +344,35 @@
General rules
344
344
section>
345
345
<sectionid="roleMappingComputedRole">
346
346
<h2>Computed Roleh2>
347
-
<p>The computed role of an element is a string that represents the role of the element for the purposes of specification comformance testing. When an element has a role but is not contained in the required context (for example, a role `listitem` used on an element outside of a `list`), the computed role of the element is unspecified.p>
348
-
<pclass="note">User agents can provide this role string, for example, in response to the WebDriver function <ahref="https://w3c.github.io/webdriver/#get-computed-role">`getComputedRole`a>.p>
347
+
<p>The `computedrole` of an element is a string that represents the role of the element as computed by the browser engine. The `computedrole` is used primarily for the purposes of developer tools and specification comformance and interoperability testing.p>
348
+
<pclass="note">User agents provide this role string, for example, in developer tools, and in response to the WebDriver function <ahref="https://w3c.github.io/webdriver/#get-computed-role">`getComputedRole`a>, which is used for <ahref="https://github.com/w3c/aria/blob/main/documentation/tests.md">interoperability testing of ARIA, HTML-AAM, and other specificationsa>.p>
<p>When an element has a role but is not contained in the required context (for example, an orphaned `listitem` without the required accessible parent of role `list`), User Agents MUST ignore the role token, and return the `computedrole` as if the ignored role token had not been included.p>
<div role="listitem"> <!-- computedrole returns "listitem" in the required context. -->pre>
365
+
366
+
aside>
367
+
<p>When host language elements do not have an exact or equivalent mapping to a valid, non-abstract role, the related Accessibilty API Mapping extension specification MAY specify a unique `computedrole` string as the return value for interoperability testing purposes, such as `<video> -> "html-video"` in [[HTML-AAM]]. However, authors MUST NOT use any host-language-prefixed `computedrole` string in the `role` attribute (such as `html-video`), unless the token also matches valid, defined role (such as `dpub-chapter`). User Agents MUST ignore any abstract or invalid role token.p>
0 commit comments