agentleFS
seven-hills-softwareseven-hills-software/skillwright-skills/accessibility-a11y/SKILL.md

accessibility-a11y

Skill0 starsChanged 5 months agoMITView on GitHub

WCAG 2.2 AA checklist for UI components — semantic HTML, keyboard nav, focus management, screen reader support.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 6

    Distinctive

    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
  1. Distinctive:

    Every component, page, and flow ships at WCAG 2.2 AA or better.

    line 14
  2. Distinctive:

    Use the right element for the job before reaching for ARIA.

    line 18
  3. Very specific:

    Every interactive element reachable with Tab, in a logical order.

    line 27
  4. Distinctive:

    When a modal opens, focus moves into it.

    line 37
  5. Very specific:

    When a route changes, focus moves to the new page's <h1> or main heading.

    line 38
  6. Distinctive:

    Test in greyscale and in dark mode if you support it.

    line 47
  7. Very specific:

    Every <img> has an alt. Decorative images use alt="".

    line 51
  8. Very specific:

    Every input has a <label> programmatically associated (for / id or wrapping).

    line 58
  9. Very specific:

    Don't use placeholder as a label.

    line 63
  10. Distinctive:

    No flashing > 3 times per second (seizure risk).

    line 68
  11. Very specific:

    Don't put role="button" on a <div>.

    line 74
  12. Very specific:

    Don't hide content with display: none if you need a screen reader to announce it.

    line 75
  13. Distinctive:

    Test with VoiceOver (macOS / iOS) and NVDA (Windows) at least once before shipping.

    line 76

“Common” is measured: kept by at least 6 in 10 of the 7 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 (WCAG 2.2 AA)

Every component, page, and flow ships at WCAG 2.2 AA or better. Accessibility isn't a separate phase — it's part of "done". Run this checklist on every UI PR.

Semantic HTML first

  • Use the right element for the job before reaching for ARIA. ARIA fixes nothing that semantic HTML didn't break first.
  • Buttons that look like links → <a>. Links styled as buttons → <button>. They are not interchangeable.
  • Headings (h1–h6) reflect document structure, not visual hierarchy. Don't pick a heading for its size — that's CSS's job.
  • Forms use <form>, <label>, <fieldset>, <legend>. Every input has a programmatically associated label.
  • Lists use <ul> / <ol> / <li>. Don't fake a list with divs.
  • Landmarks: <header>, <nav>, <main>, <aside>, <footer> — exactly one <main> per page.

Keyboard

  • Every interactive element reachable with Tab, in a logical order.
  • Enter activates buttons and links; Space activates buttons.
  • Escape closes modals, dropdowns, popovers.
  • Arrow keys navigate within composite widgets (radio groups, menus, tablists).
  • Custom widgets implement the matching ARIA pattern — don't invent a new one.
  • Focus is always visible. Never outline: none without a custom focus indicator at ≥3:1 contrast.
  • Skip-link to <main> at the top of every page.

Focus management

  • When a modal opens, focus moves into it; when it closes, focus returns to the trigger.
  • When a route changes, focus moves to the new page's <h1> or main heading.
  • Toasts and notifications don't steal focus. Use aria-live instead.
  • Focus traps in modals and only modals — every other widget allows tabbing out.

Color & contrast

  • Text contrast ≥4.5:1 against background (3:1 for ≥18pt or ≥14pt bold).
  • Non-text UI (icons, focus rings, borders that convey state) ≥3:1.
  • Color is never the only signal. Errors carry an icon + text, not just red. Required fields have a * and aria-required, not just a colored asterisk.
  • Test in greyscale and in dark mode if you support it.

Images & media

  • Every <img> has an alt. Decorative images use alt="". SVGs that are decorative get aria-hidden="true".
  • Icons inside buttons that have visible text use aria-hidden="true" on the icon.
  • Icon-only buttons have aria-label.
  • Videos have captions (and transcripts for long-form). Auto-play with sound is forbidden.

Forms

  • Every input has a <label> programmatically associated (for / id or wrapping).
  • Required fields announced via aria-required="true" and visually marked.
  • Error messages associated with their input via aria-describedby and aria-invalid="true".
  • Errors appear inline near the field, not only at the top of the form.
  • autocomplete attributes set correctly (email, current-password, cc-number).
  • Don't use placeholder as a label. Placeholders disappear and have poor contrast.

Motion

  • Respect prefers-reduced-motion. Disable parallax, autoplay, large animation when set.
  • No flashing > 3 times per second (seizure risk).
  • Carousels: pause-on-focus, and a visible pause button.

Screen-reader specific

  • Live regions: aria-live="polite" for status messages, assertive only for genuine errors blocking the user.
  • Don't put role="button" on a <div>. Use a <button>. The two are not equivalent for screen readers.
  • Don't hide content with display: none if you need a screen reader to announce it. Use .sr-only (visually hidden, accessible).
  • Test with VoiceOver (macOS / iOS) and NVDA (Windows) at least once before shipping.

What to flag in review

  • <div onClick> instead of <button>.
  • Custom widgets that don't implement the ARIA pattern (modal without role="dialog" and focus trap, etc.).
  • Click-only handlers — every action also reachable by keyboard.
  • Color-only state changes (e.g. red border on error with no text or icon).
  • Missing alt on <img>, missing aria-label on icon buttons.
  • Outline removed without a replacement focus indicator.
  • Auto-focusing inputs that aren't expected (steals focus from screen reader users).
  • tabindex values > 0 — they break logical order.

Tooling

  • eslint-plugin-jsx-a11y (React) or @vue/eslint-plugin-vue-a11y (Vue) on every PR.
  • axe-core integrated into component tests.
  • One full-page Lighthouse run before each release; accessibility score ≥95.

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.