--- name: accessibility-pass description: Run a hands-on accessibility pass on a web page or component - keyboard walk, focus visibility, names and roles, live announcements, reduced motion, contrast and zoom - verifying each check in a real browser rather than by reading code. Use before shipping UI, or when asked to check or fix accessibility. --- # /accessibility-pass Every check below says **how to verify it**. Reading the code is not verification; use a real browser (Playwright, or the browser tools you have) and observe. ## 1. Keyboard walk - Load the page, click nothing, and press Tab repeatedly from the top. Record each focused element: `document.activeElement` tag, role and accessible name. - **Pass when:** every interactive element is reached, in reading order, and nothing that isn't interactive takes focus. No focus trap except inside an open dialog. - Operate every control with the keyboard only: Enter and Space on buttons, arrows in tabs, radios, sliders, menus and listboxes, Escape to close anything that opens. - **Composite widgets** (tabs, menus, listboxes, grids) should be one Tab stop with arrow keys inside (roving tabindex or `aria-activedescendant`). - **Pass when** closing a popover, dialog or menu returns focus to the control that opened it, and deleting or moving an item leaves focus somewhere sensible, not on ``. ## 2. Focus is visible - For each focused element, take a screenshot or check computed styles. There must be a visible indicator with at least 3:1 contrast against its surroundings. - Use `:focus-visible`, so mouse clicks don't leave rings but keyboard focus always shows. - **Pass when** you can always tell where focus is from a screenshot alone. ## 3. Names, roles and states - Query the accessibility tree (Playwright's `page.accessibility.snapshot()` or `getByRole` lookups). - **Pass when:** - every control has a role and a name that says what it does ("Delete Q3 roadmap", not "button" or "×") - icon-only buttons have `aria-label` - toggles expose `aria-pressed` or `aria-checked`, and disclosures `aria-expanded` - the current page or step is marked with `aria-current` - inputs have real `