a11y-toolkit: Keyboard-trap detector
a11y_keyboardDetect keyboard traps in web pages by simulating real Tab presses and testing whether Escape releases the focus cycle. Returns the tab stop list for WCAG 2.1.2 compliance.
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). Returns the full tab stop list too. Requires local Playwright. — Scope: keyboard traps (2.1.2); focus visibility is part of a11y_audit_dom.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Page URL to Tab-walk (http/https or file://) | |
| lang | No | Output language (default en) | |
| max_pasos | No | max real Tab presses (60 default) | |
| auth_state | No | Path to a Playwright storage_state JSON (exported session) to Tab-walk behind login |