Audit page accessibility
audit-accessibilityRun axe-core on live pages (WCAG 2.2 AA by default), including behind login via storageState/actions, to return violations with Playwright locators, fixes, and regression checks.
Instructions
Run axe-core on a live page (WCAG 2.2 AA by default) and return violations worst first, each with the offending elements as verified Playwright locators, the fix, and a regression check to paste into a spec. Accepts storageState/headers/actions to audit pages behind a login or after a step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| har | No | ||
| url | Yes | Full URL of the page to audit (http/https) | |
| device | No | Playwright device preset, e.g. 'iPhone 15', 'Pixel 7', 'iPad Pro 11' (viewport, user agent, touch) | |
| routes | No | Network mocks, first match wins: json/body/status fulfil, abort fails, delayMs alone slows the real request | |
| actions | No | Steps run in order after load to reach a state (modal, step 3). One call = one fresh browser, so include the login steps; end with a 'wait' on what the state shows | |
| browser | No | Engine (default chromium) | |
| channel | No | Branded Chromium to launch instead of the bundled one (must be installed) | |
| headers | No | Extra HTTP headers, e.g. Authorization | |
| waitFor | No | Wait for this selector first | |
| selector | No | CSS selector: audit only this part of the page | |
| standard | No | Rule set: WCAG level (default wcag22aa, i.e. 2.0–2.2 A+AA), 'best-practice' adds axe's extra rules, 'all' runs everything | |
| viewport | No | ||
| minImpact | No | Hide violations below this impact (default: minor, show all) | |
| timeoutMs | No | Overall audit limit in ms (default 60000) | |
| waitUntil | No | Navigation wait condition (default load) | |
| projectRoot | No | Project whose Playwright launches the browser (default: server root) | |
| storageState | No | Logged-in session: storageState JSON inside the project, e.g. playwright/.auth/user.json | |
| actionTimeoutMs | No | How long each action waits for its element (default 10000); keep timeoutMs above the total |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | false when the call failed (see error) or the tests it ran failed | |
| url | No | ||
| error | No | ||
| violations | No |