a11y-toolkit: Keyboard-trap + skip-link landing detector
a11y_keyboardDetect keyboard traps by real Tab-walking up to 60 stops, testing whether Escape releases the cycle, and checking skip link targets. Returns tab stops and findings as JSON.
Instructions
Keyboard-trap detection (2.1.2) with REAL Tab walking in Chromium: up to 60 real tab stops, cycle detection (the modal pattern), then the decisive test — does ESCAPE release the cycle? A modal that cycles and releases on Escape is correct and NOT reported; a cycle Escape cannot leave is a trap (high severity). It also activates the first real skip link once and reports skip_target_hidden (medium, 2.4.1) when the target is still not exposed after activation — focus landing on it is not required (browsers move the sequential-focus start regardless of tabindex). Returns the full tab stop list too. Requires local Playwright. — Scope: keyboard traps (2.1.2) + rendered bypass landing; focus visibility is part of a11y_audit_dom. Returns JSON: {tab_stops, trap_detected, escape_releases, findings}. Run on pages with modals, dialogs or embedded apps; a plain content page has nothing to trap.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "a11y_keyboard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Page URL to Tab-walk (http/https or file://) | |
| lang | No | Output language (default en) | |
| browser | No | Browser engine (auto = detect the first available) | |
| max_steps | No | max real Tab presses (60 default) | |
| auth_state | No | Path to a Playwright storage_state JSON (exported session) to Tab-walk behind login |