Accessibility Tree
The accessibility tree is the browser's semantic representation of relevant interface objects for platform accessibility APIs and assistive technologies.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/accessibility-tree/
01What it means
The accessibility tree contains accessible objects derived from host-language semantics, rendered state, names, roles, properties, relationships, and ARIA. Browsers expose these objects through platform accessibility APIs. It is related to the DOM but is not a copy: purely presentational or hidden nodes may be omitted, while computed accessible information may differ from markup.[1][2]
- 01HTML + ARIAHost semantics
- 02Rendered stateHidden and presentational rules
- 03Accessible objectsNames, roles, states, relations
- 04Platform APIOperating-system mapping
- 05Assistive technologyNavigation and interaction
The accessibility tree is derived from the DOM and rendering, but is not a copy of either.
02Why it matters
Screen readers and other assistive technologies depend on the roles, names, states, and relationships browsers expose. Visual appearance or DOM presence alone cannot show whether a control is represented correctly.
03When to use it
Inspect the accessibility tree when building or debugging controls, labels, live regions, hidden content, or dynamic interfaces. Start with native semantic HTML, then add ARIA only where required and test actual tasks with assistive technology.
04How it works
- The browser parses markup and computes element semantics from HTML and supported ARIA.
- Rendering and hidden-state rules determine which relevant nodes are exposed.
- Accessible names, roles, states, properties, and relationships are computed.
- The browser maps accessible objects to the operating system's accessibility API.
- Assistive technologies query changes and present navigation or interaction to users.
05A practical example
A custom disclosure looks correct but appears as unnamed text in browser accessibility tools. Replacing its clickable div with a button and synchronizing aria-expanded exposes the expected name, role, state, and keyboard behavior.
06Where it breaks
Developer-tool trees are approximations of platform exposure, mappings vary, and correct semantics do not guarantee usable interaction. Assistive technologies add their own modes and interpretations, so inspection cannot replace user-centered testing.
Common mistakes
- Assuming every DOM node appears in the accessibility tree.
- Using ARIA to repair a custom control while omitting keyboard behavior.
- Hiding focusable descendants with aria-hidden.
- Treating a clean tree inspection as proof of an accessible product.
07Sources
- Core Accessibility API Mappings 1.2W3C · W3C recommendationCore Accessibility API Mappings 1.2
- Accessibility TreeMDN Web Docs · Official technical documentationAccessibility Tree