accessibility tree
A simplified version of the DOM tree that the browser builds for assistive technology, listing each element's role, name and state.
In more detail
Decorative elements are left out and ARIA attributes change what appears. aria-hidden and inert remove content from it. Browser developer tools can show it, which is useful when debugging accessible names.
Examples
In the browser: Screen readers query this tree, not the pixels. Hidden elements drop out of it, and ARIA attributes change what it says without changing the visual page. Browser developer tools can show it for inspection.getByRole queries the accessibility tree rather than the raw page markup.Related terms
- DOM — The tree of objects a browser builds from a web page, which scripts read and change to update what is on screen.
- ARIA — The W3C standard of HTML attributes, such as role and aria-expanded, that tell assistive technology what a custom widget is and what state it is in.
- accessible name — The text assistive technology uses to identify a control, such as "Delete account" for a button.
- aria-hidden — An ARIA attribute that removes an element and everything inside it from the accessibility tree, while leaving it visible and clickable.
- accessibility API — The operating system interface through which the browser hands its accessibility tree to screen readers and other assistive technology.
- screen reader — Software that reads the screen aloud or sends it to a braille display, used mainly by blind and low-vision people.
Taught in
- Overlay Architecture: Portals, Stacking Contexts & Backdrops — Design Systems & Component Engineering
- WAI-ARIA Semantics: Roles, States & Accessible Name Computation — Design Systems & Component Engineering
- Accessibility Tree, ARIA Roles, States And Live Regions — Frontend Architecture & Web Platform
- MutationObserver: Reactive DOM Watching Without Polling — Frontend Architecture & Web Platform
- End-to-End Testing with Playwright: Multi-Tier Suites — Production Full-Stack Engineering