pwshub.com

Interop 2024: Chrome at 100% for the accessibility focus area

Stay organized with collections Save and categorize content based on your preferences.

Chrome started the year passing 88.2% of tests in the accessibility focus area of Interop 2024. In June 2024 we were first to reach 100% of tests passing. This post explains the work that happened to reach this goal.

What is included in the accessibility focus area?

As with every focus area in Interop 2024, the accessibility area is defined by a set of web platform tests for selected features. The tests in Interop 2024 aim to ensure all browsers create accessible names and computed roles in the same way.

Accessible names convey the purpose or intent of an HTML element. This helps users understand what the element is for and how they can interact with it. The accname specification defines how browsers create this accessible name string for an element. The ARIA specification includes a walkthrough of how this name is calculated.

The computed role of an element is a string that represents the role of the element as computed by the browser engine. This is used primarily in developer tools and, for example, in the WebDriver function getComputedRole, enabling interoperability testing.

What did the Chrome team need to do?

There were two larger areas of work that we needed to complete—changing mapping of roles to generic roles and removing deprecated roles. Then there were some additional smaller fixes and features to implement. In addition to the following work that the Chrome team completed, we also collaborated with Microsoft on fixes they were committing to Chromium for the accessibility focus area.

Change mapping for certain roles to a generic role

Changing a mapping to generic role removes accessibility semantics from an element. Generic elements don't provide value to an accessibility tree, so they are not included in the tree. This helps with performance and makes the tree smaller and easier to parse for assistive technology. The following roles are changed to a generic role.

  • A <header> scoped to <main> or a sectioning content element (<article>, <aside>, <nav>, or <section>).
  • A <footer> scoped to <main> or a sectioning content element (<article>, <aside>, <nav>, or <section>).
  • An <aside> inside a sectioning content element (<article>, <aside>, <nav>, or <section>) without an accessible name.
  • A <section> without an accessible name.
  • Orphaned list items (<li>).

For the first four bullet points, typically these elements are mapped to landmark roles. Having two many landmarks on a page can make it harder to navigate, so this change helps reduce redundant landmarks making the page easier to navigate. The final item typically indicates a mistake by the page developer, a list item should always be inside a list, therefore an orphaned item is given a generic role.

Remove a deprecated role

We deprecated the directory role, and mapped it to the list role. ARIA 1.2 deprecates the directory role. The specification explains that it is equivalent to the list role, and the developers should use list. In order to maintain the semantics of older content that uses directory, it's now mapped to list in Chrome.

Other fixes

We added support for the gridcell role. This new role makes the distinction between gridcell and cell more clear. A gridcell is focusable, editable, and selectable, unlike cell.

We added fallback role calculation. Previously, we did not check for fallback roles so if the first role was not valid, we used another role, which is not what is detailed in the specification.

Some roles are only valid if they are in the correct context, we added a check for invalid use of roles, as follows:

  • The row role should be inside table, grid, rowgroup, or treegrid.
  • The rowgroup role should be inside table, grid, tree, or treegrid.
  • The listitem role should be inside list.

If the role is invalid Chrome now uses other information, such as the HTML element, to compute an alternative role.

We marked thead and tfooter as included in the accessibility tree. Previously they were marked as ignored, but were still included in the tree. Now table header and table footers can be parsed by assistive technologies.


While these changes may not be visible to most developers, with all browsers working to ensure these things work in the same way, we ensure that different roles are exposed in the same way everywhere.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-07-31 UTC.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]

Source: web.dev

Related stories
2 weeks ago - The State of CSS 2024 survey is now live! We'd love you to take the survey, and this post explains how we use the results and why we think it's important that as many developers as possible take part. Our aim as the Chrome team is to make...
1 month ago - Discover some of the interesting features that have landed in stable and beta web browsers during July 2024.
1 month ago - Experimenting with subgroups, deprecate setting depth bias for lines and points, hide uncaptured error DevTools warning if preventDefault, WGSL interpolate sampling first and either, and more.
1 month ago - Have you ever wondered what happened after CSS3? It’s common knowledge that we never saw CSS4 come after it, yet we have a plethora of new features that have no similar way of defining when they were introduced. The W3C CSS-Next community...
1 week ago - Angular is a famous framework for building robust and complex enterprise applications. It is widely used by large companies. Therefore, having the skills to build a performant application using Angular is one of the top skills for a...
Other stories
1 hour ago - This release candidate, a near-final look at Deno 2, includes the addition of Node's process global, better dependency management, and various API stabilizations, and more.
1 hour ago - Published: September 19, 2024 The CSS Working Group has combined the two CSS masonry proposals into one draft specification. The group hopes that...
1 hour ago - Stay organized with collections Save and categorize content based on your preferences. Published: September...
3 hours ago - DNS monitoring tool is a cloud-based scanner that constantly monitors DNS records and servers for anomalies. This tool aims to ensure that users are sent to genuine and intended website pages, instead of fakes or replicas. It alerts users...
4 hours ago - Email spoofing is a malicious tactic in which cybercriminals send fake emails that look like they come from trusted organizations or individuals. When unsuspecting users act on these emails, they may unknowingly share sensitive data,...