a11y-page-audit
Skill20 starsChanged 15 days agoMITView on GitHub
Run an accessibility and keyboard navigation audit on a web page or project, then fix what it finds — audit, fix, and verify, not just a report. Use whenever the user asks about accessibility, a11y, keyboard navigation, focus styles or focus management, screen readers, ARIA, WCAG compliance, skip links, tab order, or making a site keyboard-navigable before shipping.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- lc-d/deep-a11y-web-skilltheir own version, first seen Oct 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- lc-d/deep-a11y-web-skill★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- branch-comment-cleanupSkill
- branch-test-planSkill
- context7-mcpSkill
- env-example-syncSkill
- feature-based-architectureSkill
- great-readmeSkill
- harvest-reviewsSkill
- light-dark-modeSkill
- localizationSkill
- minimal-code-changesSkill
- prod-page-auditSkill
- quantum-design-tokensSkill
- reviewable-commitsSkill
- shell-aliases-socialSkill
- skill-best-practices-syncSkill
- skills-auditSkill
- skills-socialSkill
- stacked-pr-splitterSkill
- team-reviewerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
If ambiguous, ask one focused question before proceeding.
- Very specific: line 36
Fix: remove global outline resets.
- Distinctive: line 49
Add a system-level focus color token per theme.
- Very specific: line 53
Add component-level tokens aliasing it: --focus-ring-color, --focus-ring-width: 2px, --focus-ring-offset: 2px.
- Distinctive: line 55
Add the global rule:
- Very specific: line 62
Do NOT set border-radius here — outline follows the element's existing radius automatically.
- Very specific: line 102
No double-announcing: alt="" on decorative images whose accessible name comes from a sibling
- Very specific: line 118
Remove redundant ARIA (<button role="button">, <nav role="navigation">)
- Distinctive: line 122
Check: after client-side navigation, does focus reset so the next Tab starts from the top?
- Very specific: line 143
Use :has(:focus-visible), not :focus-within — the latter triggers on mouse focus.
- Distinctive: line 157
Every focused element shows a clearly visible ring.
- Distinctive: line 164
Automated smoke test: run Lighthouse (axe DevTools when Lighthouse is unavailable):
- Very specific: line 206
Tailwind: check for outline-none in the base layer.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Accessibility & Keyboard Navigation Audit
Audit-then-fix workflow. The goal is to leave the codebase with working keyboard nav, visible focus indicators, correct semantics, and proper ARIA — not just a report.
Phase 0 — Understand the target
- Input type: directory → scan components, layouts, global CSS. URL → fetch HTML and flag that source fixes need the actual codebase.
- Framework: determines where layouts, head tags, and route changes live.
- Design system: tokens / CSS custom properties / Tailwind / component library — determines how to implement the focus ring.
If ambiguous, ask one focused question before proceeding.
Phase 1 — Audit & fix
Work through each category: record file path, current state, verdict (✅ PASS / ⚠️ WARN / ❌ FAIL), then apply the fix pattern for every ❌ and ⚠️.
1.1 Global CSS resets
Check: * { outline: none }, *:focus { outline: none }, or any blanket outline: 0
without a paired visible alternative — the most common a11y regression.
Fix: remove global outline resets. If a component legitimately needs a custom
indicator (e.g. box-shadow ring on inputs), keep outline: none only when paired with a
visible alternative using the focus token.
1.2 Focus ring system
Check: is there a shared, theme-aware focus ring?
- A design token / custom property for focus color that adapts between light and dark mode
- Passes WCAG AA contrast for UI components (3:1) against each mode's background
- A global
:focus-visiblerule applying the ring - Components aliasing the token rather than hardcoding hex values
Fix — if missing, build it:
- Add a system-level focus color token per theme. Pick from the existing palette when possible; each mode's value must pass 3:1 against that mode's background. If the brand palette has no passing color, use the closest passing color and document the override — don't sacrifice visibility for brand consistency.
- Add component-level tokens aliasing it:
--focus-ring-color,--focus-ring-width: 2px,--focus-ring-offset: 2px. - Add the global rule:
Do NOT set:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); }border-radiushere —outlinefollows the element's existing radius automatically; setting it changes the element's shape on focus. - Re-point existing per-component focus tokens to alias the system color.
1.3 Interactive elements
Check focus visibility and keyboard operability for: buttons (real <button> vs
<div onClick>), links (incl. anchor-wrapped cards), form inputs and custom checkboxes,
custom widgets (dropdowns, accordions, toggles, hamburger menus — keyboard operable?
aria-expanded?), and persistent landmarks (header/footer/nav tab order).
Watch for: :focus used instead of :focus-visible (rings on mouse click);
outline: none with no visible alternative; non-interactive elements with onClick but no
role, tabIndex, or keyboard handler.
Fix: replace :focus selectors with :focus-visible unless there's a documented
reason (rare — e.g. a text input that should always show its ring). Make custom widgets
keyboard-operable.
1.4 Skip link (WCAG 2.4.1)
Check: exists; is the first focusable element; target <main> has tabIndex={-1} so
focus actually moves; hidden with transform (not display: none — removes it from tab
order); revealed on :focus-visible (not :focus — shows on mouse click).
Fix — if missing:
<a href="#main-content" className="skip-to-content">Skip to main content</a>
<main id="main-content" tabIndex={-1}>...</main>Hidden by default via transform: translateY(-200%), revealed on :focus-visible, styled
through design tokens, high z-index.
1.5 Semantic HTML
Check:
- Exactly one
<main>per page (SPAs commonly nest multiples) - One
<h1>, no skipped heading levels - Landmarks (
<header>,<nav>,<main>,<footer>,<aside>) instead of<div>+ role - Footer/sidebar section titles are headings, not
<p>/<span> - No double-announcing:
alt=""on decorative images whose accessible name comes from a sibling <html lang="...">set
Fix: collapse nested <main>s (keep one, demote others to <div>); promote section
titles to headings with font-family: inherit; margin-top: 0; to preserve rendering; fix
heading gaps; set decorative alt=""; add lang.
1.6 ARIA
Check & fix:
- Icon-only buttons (hamburger, theme toggle, close, search) →
aria-label - Disclosure triggers (menus, accordions, collapsibles) →
aria-expanded(with JS toggle if needed) - Form errors →
aria-invalid+aria-describedbylinking to the message - Decorative SVGs/emojis next to text →
aria-hidden="true" - Remove redundant ARIA (
<button role="button">,<nav role="navigation">)
1.7 SPA route-change focus (if applicable)
Check: after client-side navigation, does focus reset so the next Tab starts from the top? Does scroll reset?
Fix: in the route-change/scroll-restoration hook, scroll to top and blur
document.activeElement (when it's an HTMLElement other than body) on pathname change.
1.8 Overflow-hidden focus clipping
Check: parents with overflow: hidden (cards, pills, button groups) containing
focusable children — the parent clips an outline that extends beyond its bounds.
Fix:
- Pill / small element: negative offset so the ring draws inside —
outline-offset: -2px - Card / large target: move the ring to the parent and suppress the inner one:
Use.card:has(a:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); } .card a:focus-visible { outline: none; }:has(:focus-visible), not:focus-within— the latter triggers on mouse focus.
Phase 2 — Verify
Keyboard walkthrough (repeat on every major route). Drive it with the Playwright MCP
server: playwright:browser_navigate to the page, playwright:browser_press_key with
Tab for each stop, playwright:browser_evaluate with
() => document.activeElement?.outerHTML.slice(0, 200) to read what has focus, and
playwright:browser_take_screenshot to check the ring. If the server isn't connected,
don't install it yourself: list the walkthrough under "Still needs human attention"
instead of claiming it, and fill the report's "Better audit" note (see Report).
- Load the page, press Tab — first stop must be the skip link.
- Continue: skip-link → logo → nav → main CTAs → cards → footer links. Nothing silently skipped; no focus trap (except modals with proper escape handling).
- Every focused element shows a clearly visible ring.
- Toggle dark mode, tab again — ring switches color and stays visible.
- Route changes reset focus to the top (next Tab hits skip-link again).
Forms: tab into every input (indicator visible), Enter submits, error states expose
aria-invalid + linked messages.
Automated smoke test: run Lighthouse (axe DevTools when Lighthouse is unavailable):
npx lighthouse <url> --only-categories=accessibility --output=json --quiet \
--chrome-flags="--headless"It needs Chrome; without it, list the check under "Still needs human attention". Treat the score as a regression catch, not a substitute for the manual walkthrough.
Fix any failure found, then repeat the walkthrough and checks until they pass before reporting.
Report
## Accessibility Audit Report — [Page/Project]
Focus System [PASS / BUILT / NEEDS WORK]
Skip Link [PASS / ADDED / MISSING]
Keyboard Nav ✅/⚠️/❌ per item + findings
Semantic HTML ✅/⚠️/❌ per item + findings
ARIA ✅/⚠️/❌ per item + findings
SPA Focus Reset [PASS / FIXED / N/A]
### Changes made
- [files modified/created, one line each]
### Still needs human attention
- [manual testing, content decisions, visual review]
### Better audit (only when Playwright MCP wasn't connected)
The keyboard walkthrough was not run in a browser. Install the Playwright MCP server so
the next audit can drive it end to end, then start a new Claude Code session:
`claude mcp add --scope user playwright npx @playwright/mcp@latest`
### Conventions to document
- [rules for AGENTS.md / CLAUDE.md so future contributors maintain these patterns]Notes & edge cases
- Tailwind: check for
outline-nonein the base layer; replace withfocus-visible:ring-*utilities tied to the token. - Component libraries (Radix, Headless UI, shadcn): they handle ARIA internally — audit the rendered DOM, not the source.
- CSS-in-JS: focus resets may hide in
createGlobalStyleor theme objects — search all style definitions foroutline. - Next.js App Router: route-change focus reset lives in a client component wrapping
usePathname(); the skip-link target goes on<main>inapp/layout.tsx.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

