agentleFS
looties-iolooties-io/looties-skills/a11y-audit/SKILL.md

a11y-audit

Skill1 starsChanged 52 days agoMITView on GitHub

Audit and fix web accessibility (WCAG 2.1 AA) in a web app, covering keyboard navigation, focus management, screen-reader semantics (landmarks, headings, ARIA), and color contrast, then implement the non-breaking fixes using shared a11y primitives instead of hand-rolled ones. Use whenever the user mentions accessibility, a11y, WCAG, screen readers, keyboard navigation, focus management, contrast, ARIA, or skip links; and also when they describe a symptom without naming accessibility (\"can't use checkout with a keyboard\", \"focus gets lost when the modal closes\", \"this text is hard to read\"). Applies to a single component as much as a full-app audit.

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use perf-audit, design-tokens and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • WhatIfWeDigDeeperSkill

    perf-audit

    Profile and optimize React application performance

    Also in 4 projects that use this

  • ilikescienceSkill

    design-tokens

    Expert in design tokens using the DTCG specification. Use this skill when users ask about design tokens, DTCG format, token validation, formatting, transformation, color spaces (sRGB, Display P3, OKLCH), references and aliasing, resolvers, theming with modifiers/contexts, multi-platform design systems, accessibility, or working with tools like jq, jsonata, and terrazzo. Helps with token file creation, resolver configuration, structure, naming conventions, and best practices.

    Also in 4 projects that use this

  • Sagargupta16Skill

    dependency-audit

    Audit project dependencies for security vulnerabilities, licensing issues, maintenance health, and optimization opportunities. Use it during regular security audits (monthly or quarterly); before a major release when you want to ensure the dependency tree is clean; when evaluating whether to adopt or replace a dependency; after a security advisory affects one of your dependencies; when your install times or bundle sizes have grown noticeably.

    Also in 3 projects that use this

  • lbednerSkill

    i18n

    Use when a code or template change introduces a new translation message key, in either the framework CLI (aegis/i18n/locales/) or a generated project's CLI (the app/i18n/locales/ template tree). Covers adding the real English string, stubbing the same key into every other locale for parity, and the separate translation PR that later replaces placeholders with reviewed native text.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 5 projects that use this

  • VercelSkill

    deploy

    Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 13 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run an evidence-based WCAG 2.1 AA pass over an app (or a scoped part of it), write a dated audit record, and when asked to implement, apply …

    line 12
  2. Distinctive:

    Read the project's frontend conventions and design-token documentation, and follow any rule the repository states about which docs must be …

    line 23
  3. Distinctive:

    Default to report-only when the user asks to "audit", "check", or "review": findings plus ready-to-apply snippets, no code changes.

    line 43
  4. Very specific:

    Lint: run the project's linter and filter for the jsx-a11y/* rules (or the equivalent for your framework).

    line 68
  5. Distinctive:

    Never downgrade an a11y rule to make a finding go away.

    line 72
  6. Distinctive:

    Automated scan in a real browser: run axe against the built app end to end.

    line 77
  7. Distinctive:

    Verify load-bearing claims first-hand before they go in the report: open the file at the cited line.

    line 81
  8. Distinctive:

    Write the report wherever the project keeps dated records, named for its own convention.

    line 86
  9. Distinctive:

    Run the project's full verification command (lint, types, unit tests).

    line 124
  10. Distinctive:

    Run the end-to-end suite against a fresh build, and confirm the app actually mounted before trusting a clean axe result.

    line 125
  11. Distinctive:

    Add new pages and flows to the scanned list.

    line 131
  12. Distinctive:

    Update the audit record with what shipped, what was corrected, and what stays quarantined.

    line 133
  13. Distinctive:

    A passing e2e suite may be scanning an empty page: If the app needs public environment variables to boot and CI supplies none, the SPA …

    line 143
  14. Very specific:

    aria-modal="true" does not trap focus: Only a keydown handler does.

    line 147
  15. Distinctive:

    Documentation drifts from config: If a documented hex or token value contradicts the Tailwind config, the config is truth.

    line 154

“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Web Accessibility Audit and Non-Breaking Fix Pass

Run an evidence-based WCAG 2.1 AA pass over an app (or a scoped part of it), write a dated audit record, and when asked to implement, apply only changes that are additive and visually non-breaking, quarantining anything that would change the UI into a design-decision list. This two-bucket split is the core of the skill: it lets accessibility work ship without design sign-off stalling it.

Written for React and Tailwind, but the method, lenses, instruments and pitfalls port to any component-based frontend.

Before you start

Read the project's frontend conventions and design-token documentation, and follow any rule the repository states about which docs must be read before writing code. If a previous accessibility audit record exists, read it first so you extend it rather than rediscover it.

Then locate the project's existing a11y primitives, because Phase C depends on them:

PrimitiveWhat to look for
Modal contractA hook or wrapper owning focus-in, Tab trap, Escape, focus restore, scroll lock
Skip linkAn sr-only focus:not-sr-only link targeting the main landmark
Route-change focusA component that focuses <main> on SPA navigation
Combobox patternAn existing autocomplete with correct keyboard handling, to copy
In-text link styleThe class combination used for links inside prose

Any of these that does not exist is itself a finding, and building it once is cheaper than fixing its absence per component.

Mode: report or implement?

Default to report-only when the user asks to "audit", "check", or "review": findings plus ready-to-apply snippets, no code changes. Implement only when asked ("fix it", "apply", "implement"). When implementing, the project's own definition of done applies: unit tests for new behavior, the repository's verify and build commands green, and any translated string added to every locale the project ships.

Phase A: audit

Sweep the four lenses below. For a full-app audit, fan out one parallel read-only exploration agent per lens; for a scoped audit (one page or component), check the lens checklists inline. The per-lens checklists, grep patterns, and WCAG SC mappings are in references/audit-lenses.md. Read it before sweeping.

  1. Keyboard navigation: unreachable or invisible controls, mouse-only widgets, arrow-key patterns, tabIndex hygiene, hover-only reveals, drag-only interactions.
  2. Focus management: modal contract (trap, restore, Escape, dialog ARIA), skip link, route-change focus, live regions for dynamic updates.
  3. Content and readability: heading hierarchy per rendered state, text size floors, sanitized rich text, reduced-motion coverage.
  4. Landmarks: one <main>, labeled <nav>s, banner and contentinfo, content stranded outside all landmarks.

Ground your findings in three objective instruments. Subjective sweeps alone miss things and over-report others:

  • Lint: run the project's linter and filter for the jsx-a11y/* rules (or the equivalent for your framework). If the codebase is clean at error severity, keep it that way, and note what that tells you: the remaining problems are exactly the ones static analysis cannot see, namely focus behavior, contrast, and landmark labeling. Never downgrade an a11y rule to make a finding go away.
  • Contrast math: node scripts/contrast.mjs computes WCAG ratios from the real token values in the Tailwind config, or --pair '#fg,#bg' for ad-hoc checks. Never eyeball contrast, and never trust hex values written in documentation. Design docs drift from the config, and the config is what ships.
  • Automated scan in a real browser: run axe against the built app end to end. Make sure it boots first (see the pitfall below), because a scan of an unmounted shell reports zero violations and looks like success.

Verify load-bearing claims first-hand before they go in the report: open the file at the cited line. Exploration agents are good at coverage and mediocre at precision.

Phase B: report

Write the report wherever the project keeps dated records, named for its own convention. Structure:

# YYYY-MM-DD — <scope> Accessibility Audit (WCAG 2.1 AA)
Status / scope / method
## Executive summary   (scorecard per lens + top issues ranked by user impact)
## Findings per lens   (file:line evidence, WCAG SC number, ready-to-apply snippet)
## Tooling ratchets    (zero-UI-impact CI/lint improvements)
## Quarantined: needs design sign-off   (every visible change, with measured ratios)
## Appendices          (contrast tables, capability matrices)

Rank by user impact, not by WCAG severity. Include what is already good, because it tells the reader (and the next audit) which patterns to preserve. Every finding carries its evidence as file:line and its fix as a snippet, so implementation is one approval away.

Phase C: implement the non-breaking slice only

The "truly additive" test. A change qualifies only if a sighted mouse user sees nothing different:

  • sr-only markup, aria-* attributes, landmark labels: always safe.
  • Same-class tag swaps (h2 to h1, h3 to h2, nav to div): pixel-identical, because Tailwind Preflight unstyles headings and all styling lives in the classes.
  • focus-visible: styles on buttons and links: keyboard-only, safe.
  • focus-visible: on text inputs: NOT safe. Text fields match :focus-visible on mouse click too, so the ring shows during normal mouse use. Visible change, so quarantine it.
  • Color, text-size and underline changes: quarantine with measured before and after ratios.

Fix with the project's primitives (the ones you located above) instead of hand-rolling. The cookbook with adoption snippets is references/fix-patterns.md. Read it before writing fixes.

Phase D: verify

  1. Run the project's full verification command (lint, types, unit tests).
  2. Run the end-to-end suite against a fresh build, and confirm the app actually mounted before trusting a clean axe result.
  3. Gate on it: block critical and serious axe violations in CI. Exempting color-contrast while design decisions are pending is reasonable, as long as the exemption is recorded and temporary. Assert the skip-link and modal focus contracts behaviorally, not just structurally.
  4. Add new pages and flows to the scanned list. Coverage only ratchets up.

Update the audit record with what shipped, what was corrected, and what stays quarantined. The record is what the next audit builds on.

Pitfalls

Each of these has burned a real audit at least once.

  • Lint-clean is not accessible. role="presentation" on a clickable backdrop silences the linter while making a dialog semantically invisible. Lint verifies syntax; you verify behavior.
  • A passing e2e suite may be scanning an empty page. If the app needs public environment variables to boot and CI supplies none, the SPA never mounts under a preview server and every axe scan passes vacuously against the boot skeleton. If axe reports zero violations on a page you know has issues, confirm the app mounted.
  • aria-modal="true" does not trap focus. Only a keydown handler does. Counting attributes will tell you a codebase is compliant when almost none of its modals trap.
  • Do not fabricate landmark labels' language. Screen readers append the role, so label a nav "Primary", not "Primary navigation".
  • Unknown attributes may be deliberate. Custom attributes can belong to a machine-readable layer (agent or automation metadata) and be declared in the project's type definitions. Check before stripping them.
  • Documentation drifts from config. If a documented hex or token value contradicts the Tailwind config, the config is truth. Fix the doc in the same change.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.