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

Taught in

References