Accessibility Tree Visualizer

Visualize how HTML maps to an accessibility tree and compare inaccessible vs semantic markup side by side.

The Accessibility Tree Visualizer parses your HTML and builds the computed accessibility tree using HTML-AAM role mappings. It shows a side-by-side comparison of inaccessible "div soup" versus properly structured semantic HTML, calculates accessibility scores, and renders the page as screen readers and AI models interpret it.

Your data stays in your browser
Tutorial

How to Use the Accessibility Tree Visualizer

1
1

Choose a Preset or Paste Custom HTML

Select from four built-in examples like Navigation or Login Form, or click Custom HTML and paste your own markup to analyze its accessibility structure.

2
2

Compare the Accessibility Trees Side by Side

View the inaccessible div soup on the left and the semantic HTML version on the right. Each node displays its ARIA role, accessible name, and annotation explaining its purpose.

3
3

Switch Between Tree, Source, and LLM Views

Use the tab bar to toggle between the visual accessibility tree, the raw HTML source code, and the LLM view that shows how AI models and screen readers linearize your page.

Guide

Understanding Accessibility Trees and Semantic HTML

What Is the Accessibility Tree?

Every web page has a DOM tree that the browser builds from your HTML. From this DOM, the browser also constructs an accessibility tree; a parallel structure stripped down to only the information assistive technologies need. This includes element roles, accessible names, states, and relationships. Screen readers and other tools use this tree exclusively to present the page to users.

HTML-AAM: How Elements Map to Roles

The HTML Accessibility API Mappings specification defines how each HTML element maps to an accessibility role. For example, header becomes banner, nav becomes navigation, and button keeps its button role. Generic elements like div and span map to the generic role, which tells assistive technologies nothing about the element's purpose or function.

The Problem with Div Soup

When developers use div and span for everything instead of semantic elements, the resulting accessibility tree is flat and meaningless. Screen reader users cannot jump between landmarks, find headings, or navigate lists. The visual appearance may look identical, but the underlying structure provides no information to assistive technology users who depend on it.

Best Practices for Semantic Markup

Use native HTML elements that carry implicit ARIA roles whenever possible. Reserve ARIA attributes for cases where no native element exists. Ensure all landmarks have accessible names, all images have descriptive alt text, and all form controls have associated labels. Test with real screen readers in addition to automated tools to catch issues that static analysis cannot detect.

Examples

Worked Examples

Converting a Div-Based Navigation to Semantic HTML

A navigation bar uses nested divs with click handlers instead of proper nav and anchor elements.

1

Step 1: Replace the outer div with a header element.

2

Step 2: Wrap links in a nav element with an aria-label attribute.

3

Step 3: Use an unordered list (ul/li) for the link set.

4

Step 4: Convert each div link to an anchor element with an href attribute.

The accessibility tree now shows banner, navigation, list, listitem, and link roles. Screen reader users can jump directly to the navigation landmark and browse links using list navigation.

Making a Form Accessible with Proper Labels

A login form uses div elements for field labels and a div with an onclick handler as the submit button.

1

Step 1: Wrap all inputs in a form element.

2

Step 2: Use label elements with for attributes pointing to input IDs.

3

Step 3: Group related fields with fieldset and legend elements.

4

Step 4: Replace the div button with a native button element of type submit.

The accessibility score jumps from 20% to 95%. Screen readers announce each field's label before the input, and keyboard users can submit the form by pressing Enter.

Use Cases

Common Use Cases

Auditing Navigation Patterns

Compare a navigation bar built with generic divs and spans against one using proper header, nav, and list elements. See how landmarks make the page navigable by screen reader users who rely on skip links and landmark regions to move around the page efficiently.

Fixing Inaccessible Forms

Analyze login or registration forms that use divs instead of proper form elements. The visualizer shows how adding label, fieldset, legend, and proper input types creates a meaningful structure that assistive technologies can interpret and announce to users correctly.

Teaching Semantic HTML to Teams

Use the side-by-side comparison as a training tool for developers who are new to web accessibility. The visual tree makes abstract concepts like ARIA roles and landmark regions concrete and immediately understandable, helping teams adopt better practices in their daily work.

Checking Image Gallery Accessibility

Verify that image galleries use figure and figcaption elements with descriptive alt text rather than generic div wrappers. The tool highlights missing accessible names and shows the difference between images that screen readers can describe and those that are invisible to assistive technology.

Frequently Asked Questions

?What is an accessibility tree?

The accessibility tree is a simplified version of the DOM that browsers create for assistive technologies like screen readers. It contains only the information relevant to accessibility such as roles, names, states, and properties of each element.

?What are ARIA roles?

ARIA roles define the purpose of an element for assistive technologies. Semantic HTML elements have implicit roles, for example nav maps to the navigation role and header maps to banner. Custom elements may need explicit role attributes to be accessible.

?What does the accessibility score measure?

The score calculates the percentage of elements in your HTML that have meaningful semantic roles versus generic ones. A higher score means more of your markup communicates its purpose to screen readers and other assistive technologies.

?What is the LLM View tab?

The LLM View shows how AI language models and screen readers would linearize and interpret your page structure. It renders a plain text outline of the accessibility tree, helping you understand how non-visual agents navigate your content.

?Is my HTML processed securely?

Yes. All processing happens entirely in your browser using the native DOMParser API. Your HTML is never sent to any server, stored, or shared with third parties. Everything stays on your device.

?Is this tool free to use?

Yes, the Accessibility Tree Visualizer is completely free to use with no limits. There are no sign-ups, no accounts, and no premium tiers. You can use it as many times as you need for any project.

?Does this replace a full accessibility audit?

No. This tool visualizes the accessibility tree structure and helps identify missing semantics, but a full WCAG audit includes testing with actual screen readers, keyboard navigation, color contrast checks, and manual review of interactive patterns.

?Why does my section element show as generic?

Per the HTML-AAM specification, a section element only maps to the region landmark role when it has an accessible name via aria-label or aria-labelledby. Without a name, it is treated as a generic container with no semantic meaning.

Related Tools

Help us improve

How do you like this tool?

Every tool on Kitmul is built from real user requests. Your rating and suggestions help us fix bugs, add missing features and build the tools you actually need.

Rate this tool

Tap a star to tell us how useful this tool was for you.

Suggest an improvement or report a bug

Missing a feature? Found a bug? Have an idea? Tell us and we'll look into it.

Recommended Reading

Recommended Books on Web Accessibility and Inclusive Design

As an Amazon Associate we earn from qualifying purchases.

Boost Your Capabilities

Recommended Products for Accessibility Testing

As an Amazon Associate we earn from qualifying purchases.

Newsletter

Get Free Productivity Tips & New Tools First

Join makers and developers who care about privacy. Every issue: new tool drops, productivity hacks, and insider updates — no spam, ever.

Priority access to new tools
Unsubscribe anytime, no questions asked