Accessibility tree.
The accessibility tree is the structure a browser derives from a page and presents to assistive technology; it is the page a screen reader sees.
While processing a page the browser produces two separate structures. One is the document tree, representing the page’s markup; the other is the accessibility tree, representing the MEANING derived from that markup. A screen reader reads the second, not the first.
The difference between them matters. Not every element in the document tree enters the accessibility tree: visually hidden elements, images marked as decorative and blocks explicitly hidden from assistive technology stay out. Conversely, a button that is a single element in the document tree appears in the accessibility tree with its role, name, state and value.
An element’s counterpart in the tree consists of four fields. The role says what it is. The name says how it is referred to. The state says what condition it is in. The value carries its content, if any. When a screen reader reaches an element it typically reads these four in order.
Seeing the tree directly is possible and is one of the most instructive steps in an accessibility audit: browsers’ developer tools can open the tree as a list. Seeing the page structurally rather than visually reveals everything CSS hides or misrepresents.
- Reading the page from the tree, is it clear what it says — if not, the structure is incomplete.
- Are there nameless elements — items showing as “button” or “link” with no indication of what they do.
- Is anything in the tree but not on screen — hidden menus that were never removed from the tree.
- Is anything on screen but not in the tree — real content hidden by mistake.
The last two items are mirror images of one another, and both produce real defects. An invisible menu left in the tree sends the user wandering among links that are not there; real content removed from the tree simply does not exist on the page for that user.
Another benefit of the tree is that it shows what automated auditing tools look at. Most tools apply their rules to the accessibility tree rather than the document tree, so they produce no warning about an element that is not in the tree. Hiding a component from assistive technology also silences the warnings about it — and the score rises while the situation worsens.
That makes the tree both an auditing instrument and a caution: it is the only structure that can explain why the score went up.