trace_path
Trace the screen-reader navigation path to any interactive target. Returns step-by-step actions and cumulative cost to explain poor accessibility scores.
Instructions
Trace the exact screen-reader navigation path to a specific interactive target. Returns step-by-step actions a screen-reader user would perform, with modeled announcements, cumulative cost, and the target's role/name at each hop. Read-only — navigates to the URL but does not modify the page.
Use this after analyze_url to understand why a target scored poorly.
For auth-gated or explored targets: Pass statesJson from a prior analyze_url (use includeStates=true). This skips browser launch entirely and traces against the captured state, including any explored states discovered behind auth boundaries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the page to trace | |
| target | Yes | Target to trace to. Exact target ID or glob pattern (e.g., '*search*', 'Submit*'). Case-insensitive. | |
| profile | No | AT profile ID | generic-mobile-web-sr-v0 |
| device | No | Playwright device name for emulation (e.g., 'iPhone 14') | |
| waitForSelector | No | CSS selector to wait for before capturing (essential for SPAs) | |
| explore | No | Explore hidden branches (menus, tabs, dialogs) before tracing | |
| timeout | No | Page load timeout in milliseconds | |
| statesJson | No | Pre-captured states from a prior analyze_url (use includeStates=true). When provided, trace_path skips browser launch. | |
| storageState | No | Path to Playwright storageState JSON for authenticated pages. Must be within cwd. |