trace_path
Trace screen-reader navigation paths to interactive targets, mapping step-by-step actions and cumulative accessibility cost to diagnose navigation barriers.
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. Workflow: analyze_url(includeStates=true, explore=true) → extract result.states → trace_path(statesJson=JSON.stringify(states), target='search').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the page to trace | |
| target | Yes | Target to trace to. Can be an exact target ID from an analysis result, or a glob pattern to match target names (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 run. Pass the 'states' array from the JSON output (use includeStates=true on analyze_url to include it). When provided, trace_path skips browser launch and traces against the captured state. Workflow: analyze_url(includeStates=true) → extract result.states → trace_path(statesJson=...). | |
| storageState | No | Path to Playwright storageState JSON for authenticated pages. Use save_auth to create. |