Agent Navigability
Accessibility landmarks, heading hierarchy, and automated smoke tests.
Why Agent Navigability?
AI agents (like Claude, GPT, and Cursor) navigate web pages by inspecting the accessibility tree — the same tree screen readers use. If your page has proper landmarks and headings, AI agents can understand and interact with it effectively.
Required Landmarks
The layer automatically injects these landmarks:
| Landmark | Element | Source |
|---|---|---|
banner | <header> | AppHeader |
main | <main> | Layout template |
contentinfo | <footer> | AppFooter |
region | <section> | SectionWrapper (via aria-labelledby) |
Heading Hierarchy
Every page must follow a logical heading structure:
- One
h1per page (the page title) h2for section headingsh3+ for subsections- No skipped levels (e.g.,
h1→h3withouth2)
The landing page h1 typically comes from the hero section. Other layouts auto-render the page title as h1.
Interactive Elements
- All form inputs must have descriptive
<label>elements - All buttons must have meaningful text (no icon-only buttons without
aria-label) - Navigation links must have descriptive text
- Use semantic
<button>elements (not<div @click>)
Signal Capture Forms
Forms must be:
- Discoverable via
data-testid(e.g.,convert-form) - Completable by agents: fill inputs → submit → verify success state
- Accessible: proper
<form>,<label>, and<input>semantics
All ConvertForm components meet these requirements automatically.
Smoke Test Script
Run the automated navigability check:
bash scripts/agent-smoke-test.sh
This starts a dev server and validates:
- Accessibility landmarks (banner, main, contentinfo, region)
- Heading hierarchy (h1, h2)
- Interactive elements (links, buttons)
- Signal capture form discoverability
Manual Testing
agent-browser open http://localhost:3000
agent-browser snapshot # Check landmarks + heading hierarchy
agent-browser snapshot -i # Check interactive elements
agent-browser find role form # Verify forms are discoverable
Best Practices
When creating custom sections or overriding components:
- Use
SectionWrapperto get automatic landmark and testid injection - Always include a heading (
h2) in each section - Give buttons meaningful text or
aria-label - Use
<label>for all form inputs - Test with
agent-browser snapshotafter changes