HTML Native Semantics and the Accessibility Tree
Meaning before appearance
An accessibility tree is the browser’s representation of meaningful interface objects for assistive technology. It differs from the DOM: not every element becomes a separate accessible object. A native button exposes its role and supports keyboard activation.
Inspect the button: its role is button and its name is Save draft.
Links and actions
Use a link with href for navigation, and a button for an action. A button with type="button" avoids accidental form submission. CSS can change either appearance without changing the purpose.
<a href="#guide">Read guide</a><button type="button">Print guide</button><h2 id="guide">Guide</h2>The link has a destination; the button has action semantics but no print handler in this example.
Expose meaningful structure
Headings, landmarks and lists let users explore structure rather than reading everything sequentially. Use a list for a collection, not a series of visually similar div elements.
<main> <h1>Study guide</h1> <ul> <li>Read</li> <li>Practice</li> </ul></main>The tree exposes a main region, heading and list.
Common mistakes and practice
A styled div is not a native button. Inspect computed roles in browser developer tools, then test keyboard activation; neither visual appearance nor an accessibility tree alone proves usability.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
HTML Native Semantics and the Accessibility Tree — Knowledge Check
Apply the accessibility concepts taught in this lesson.
Which element provides native action activation?
Which element navigates to another section?
Is the accessibility tree identical to the DOM?
What avoids accidental form submission for an action button?
What should determine element choice?