Start a project

Tool 32 of 194 · Accessibility

Accessibility Tree Inspector

Paste a component or a page and see the tree screen readers use: every role, name and state, why each name is what it is, and what's missing.

Accessibility Tree Inspector at a glanceIllustration: 1, Your HTML; 2, processed in your browser; 3, Accessibility tree.Accessibility Tree Inspector</>1Your HTML3Accessibility tree2In yourbrowser
1 Your HTML 2 processed on your device 3 Accessibility tree

Accessibility Tree Inspector

Your HTML

Accessibility tree

Pick a node to see how its name was worked out.

Selected node

A screen reader would say roughly:

    Issues

    PriorityLineElementIssue

    Landmarks and headings

    LandmarkNameLine
    LevelHeadingLine

    Roles in the tree

    01

    What it does

    Builds the accessibility tree for pasted HTML and shows, step by step, how each element's accessible name was worked out.

    • Roles from the role attribute or HTML-AAM's implicit mappings
    • Accessible names per accname 1.2: aria-labelledby, aria-label, labels, alt, legends, captions, content, title
    • A step-by-step trace for the selected node
    • Descriptions from aria-describedby, aria-description and title

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    The accessibility tree, the name computation per node, landmarks, headings and issues, with a Copy and a Download button on every result.

    • Accessibility
    • ARIA
    • Screen readers
    • HTML

    Why it matters

    Screen readers don't read your HTML. They read the accessibility tree the browser builds from it: a role, a name and some states for each meaningful element, with layout wrappers dropped. If a button's name comes out empty, or a field is named by its placeholder, or a landmark is hidden by aria-hidden, that's what users hear. DevTools can show the tree, but one node at a time, on a running page.

    This inspector builds the tree for pasted HTML in an inert document, so scripts never run. Roles come from the role attribute or the HTML-AAM mappings (a header outside an article is a banner, a section with a name is a region). Names are computed with the accname 1.2 steps in order, and for the node you pick it shows which step produced the name and what it skipped, including circular aria-labelledby chains. It lists landmarks and the heading outline, and flags controls without names, weak names, heading jumps, duplicate unnamed landmarks and focusable content inside aria-hidden. It's an approximation: CSS-generated text and layout-dependent rules aren't seen, so confirm with a screen reader.

    How it works

    1. InputA component or page
    2. In your browserRoles, names and hidden content worked out per the specs
    3. OutputThe tree, name traces and issues

    Where it fits in a designer's workflow

    1. Plan
    2. Design
    3. Build
    4. Test
    5. Launch
    Checking what screen readers will announce before a release.

    By the numbers

    Roles in the sample product page's accessibility treelink: 5 nodes; heading: 4 nodes; navigation: 3 nodes; paragraph: 3 nodes; button: 2 nodes; img: 2 nodes; listitem: 2 nodes; option: 2 nodes; banner: 1 node; checkbox: 1 nodelink5 nodesheading4 nodesnavigation3 nodesparagraph3 nodesbutton2 nodesimg2 nodeslistitem2 nodesoption2 nodesbanner1 nodecheckbox1 node
    Counted by this tool from its sample: 33 nodes after wrappers and hidden content are dropped, 2 of them roles that need a name but have none, and 8 issues. Links and headings dominate, which is why screen reader users navigate by them. Source: W3C: Accessible Name and Description Computation 1.2; W3C: HTML Accessibility API Mappings.
    Show the numbers as a table
    RoleNodes
    link5
    heading4
    navigation3
    paragraph3
    button2
    img2
    listitem2
    option2
    banner1
    checkbox1
    combobox1
    contentinfo1
    form1
    list1
    main1
    region1
    spinbutton1
    textbox1

    How to use it

    1. Paste the HTML, and any CSS that hides things.
    2. Read the summary and issues.
    3. Click nodes in the tree to see what a screen reader would say and why.
    4. Check the landmarks and heading outline.

    FAQ

    What is the accessibility tree?

    A parallel version of the page the browser gives to assistive technology: each meaningful element with a role (button, link, heading), an accessible name, a description and states (checked, expanded). Purely visual wrappers are left out.

    How is the accessible name worked out?

    By the W3C accname algorithm, in order: aria-labelledby, then aria-label, then the native label (label element, alt, legend, caption), then text content for roles that allow it, then title or placeholder. The first step that produces text wins.

    Why is my button announced without a name?

    Usually it contains only an icon: an SVG with aria-hidden or an image with empty alt. Add visually hidden text or aria-label to the button.

    Does it run my JavaScript or CSS?

    No scripts run. CSS is used only to find rules that hide content (display:none, visibility:hidden). Generated content from ::before and ::after isn't included.

    How close is it to a real browser?

    Close for roles, names and hiding in static HTML; browsers differ in edge cases, and dynamic changes aren't seen. Treat it as a fast first check, then test with VoiceOver, NVDA or TalkBack.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk