agentleFS
Ygohel18Ygohel18/skills/accessibility-audit/SKILL.md

accessibility-audit

Skill1 starsChanged 2 months agoMITView on GitHub

Language- and framework-agnostic accessibility protocol for auditing, remediating, and validating web UI code against WCAG 2.2 Level AA standards. Triggers whenever an agent is asked to "check accessibility", "is this WCAG compliant?", "add ARIA to this component", "conduct an a11y audit", "keyboard navigation is broken", or "screen reader doesn't read this". Covers semantic HTML, color contrast (4.5:1), visible focus states, ARIA widget patterns, form labelling, reduced motion, and multi-layer manual testing.

37 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use design-system-audit, design-critique and 5 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.
  • zeon-kunSkill

    design-system-audit

    Scan an existing React/Next.js codebase and extract its implicit design system — colors, typography, spacing, component patterns, and inconsistencies. Use when onboarding to an existing project or before formalizing a design system.

    Also in 4 projects that use this

  • AnthropicSkill

    design-critique

    Get structured design feedback on usability, hierarchy, and consistency. Trigger with "review this design", "critique this mockup", "what do you think of this screen?", or when sharing a Figma link or screenshot for feedback at any stage from exploration to final polish.

    Also in 3 projects that use this

  • dylantarreSkill

    performance-optimization

    Use when animation runs slow, janky, or causes frame drops

    Also in 4 projects that use this

  • AnthropicSkill

    seo-audit

    Run a comprehensive SEO audit — keyword research, on-page analysis, content gaps, technical checks, and competitor comparison. Use when assessing a site's SEO health, when finding keyword opportunities and content gaps competitors own, or when you need a prioritized action plan split into quick wins and strategic investments.

    Also in 3 projects that use this

  • AWSSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 3 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 34 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always prefer native semantic tags (<button>, <nav>, <header>, <main>, <dialog>, <label>).

    line 29
  2. Very specific:

    Every page must have exactly one <h1>.

    line 32
  3. Very specific:

    Never skip heading levels (e.g.

    line 33
  4. Very specific:

    Every interactive element must be reachable and operable using keyboard alone (Tab, Shift+Tab, Enter, Space, Arrows).

    line 35
  5. Distinctive:

    No mouse-only interactions (hover dropdowns must activate on focus or click).

    line 36
  6. Distinctive:

    Test actual rendered colors with dark/light themes, not theoretical brand values.

    line 45
  7. Distinctive:

    Ensure focused elements are not hidden behind sticky headers or floating cookies (Criterion 2.4.11).

    line 51
  8. Distinctive:

    All clickable/tappable elements must have at least $24 \times 24$ CSS pixels bounding box (Criterion 2.5.8).

    line 53
  9. Distinctive:

    Every state attribute must reflect real DOM state:

    line 64
  10. Very specific:

    Every form input must have a <label for="field-id"> matching the input's id.

    line 75
  11. Very specific:

    Use native required and aria-required="true".

    line 81

“Common” is measured: kept by at least 6 in 10 of the 34 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

Accessibility (A11y) Audit Protocol

A comprehensive operational standard for auditing, repairing, and testing web interfaces against WCAG 2.2 Level AA compliance.

Sibling Standards:

  • For visual styling and theme tokens, refer to design-system-adapter.
  • Scope Notice: This skill strictly governs semantic structure, assistive tech compliance, and keyboard operability, independent of visual styling.

1. Semantic Structure & Keyboard Operability

  • 1.1 Native Semantic HTML Over div/span:
    • Always prefer native semantic tags (<button>, <nav>, <header>, <main>, <dialog>, <label>).
    • 🚫 Never use <div onclick="..."> when a native <button> can be used.
  • 1.2 Strict Heading Hierarchy:
    • Every page must have exactly one <h1>.
    • Never skip heading levels (e.g. <h1> followed directly by <h4>).
  • 1.3 Complete Keyboard Operability:
    • Every interactive element must be reachable and operable using keyboard alone (Tab, Shift+Tab, Enter, Space, Arrows).
    • No mouse-only interactions (hover dropdowns must activate on focus or click).

2. Color, Contrast & Focus Indicators

  • 2.1 Minimum Text Contrast Ratios (WCAG AA):
    • Normal text (< 18pt regular or < 14pt bold): Minimum 4.5:1 contrast ratio against background.
    • Large text ($\ge$ 18pt regular or $\ge$ 14pt bold): Minimum 3.0:1 contrast ratio.
    • Test actual rendered colors with dark/light themes, not theoretical brand values.
  • 2.2 Never Rely on Color Alone:
    • Form errors, badges, and statuses must pair color with text labels, icons, or visual underlines.
  • 2.3 Visible & Unobscured Focus Rings (WCAG 2.2):
    • 🚫 Never write outline: none or outline: 0 without providing a high-contrast replacement.
    • Focus indicators must meet 3:1 non-text contrast against background.
    • Ensure focused elements are not hidden behind sticky headers or floating cookies (Criterion 2.4.11).
  • 2.4 Target Size Minimum (WCAG 2.2):
    • All clickable/tappable elements must have at least $24 \times 24$ CSS pixels bounding box (Criterion 2.5.8).

3. ARIA Rules & State Synchronization

  • 3.1 First Rule of ARIA: If a native HTML element provides the behavior, do not use ARIA.
  • 3.2 Eliminate Redundant ARIA:
    • ❌ <button role="button"> (Redundant).
    • ❌ <div role="button"> without tabindex="0" and keyboard handlers (Inaccessible).
  • 3.3 Synchronize ARIA State Dynamically:
    • Every state attribute must reflect real DOM state:
      • Collapsible accordions: aria-expanded="true" when open, "false" when closed.
      • Checkboxes: aria-checked="true".
      • Selected tab: aria-selected="true".
    • Stale ARIA state actively deceives screen reader users.

4. Form Accessibility

  • 4.1 Programmatic Labels:
    • Every form input must have a <label for="field-id"> matching the input's id.
    • Placeholder text is not a substitute for a persistent label.
  • 4.2 Error Association:
    • Link error messages to inputs via aria-describedby="error-id" so assistive tech reads the error upon focus.
    • Mark invalid fields with aria-invalid="true".
  • 4.3 Mark Required Fields Programmatically:
    • Use native required and aria-required="true".

5. Media & Dynamic Content

  • 5.1 Meaningful vs. Decorative Images:
    • Informative images have descriptive alt="Graph showing 20% revenue growth".
    • Decorative icons or background illustrations must have explicit empty alt="".
  • 5.2 Dynamic Live Regions (aria-live):
    • Notify screen reader users of live asynchronous updates (e.g. search results count, "Saving draft...") using <div aria-live="polite">.
  • 5.3 Respect Reduced Motion:
    • Wrap animations in CSS @media (prefers-reduced-motion: reduce) to disable high-motion zooms or parallax for vestibular-sensitive users.

6. Multi-Layer Testing Protocol

Automated scanning tools catch at most 30–40% of accessibility defects. Every audit must combine three layers:

Layer 1: Automated Scanners (axe-core, Lighthouse, Pa11y)
  │      Quickly identifies contrast failures, missing alt text, duplicate IDs.
  ▼
Layer 2: Keyboard-Only Navigation
  │      Tab through entire page. Can you reach every button? Can you close modals with Escape?
  ▼
Layer 3: Screen Reader Smoke Test (VoiceOver on macOS / NVDA on Windows)
         Listen to how forms, live regions, and custom widgets are announced.

Detailed References

  • references/wcag-checklist.md: Complete WCAG 2.2 Level AA success criteria mapped to concrete code-level checks (including new 2.2 rules on target size, focus obscured, and redundant entry).
  • references/aria-patterns.md: Official WAI-ARIA Authoring Practices Guide (APG) templates for Modal Dialogs, Tabs, Accordions, Comboboxes, and Live Regions.

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.