agentleFS
mDevsLabsmDevsLabs/Skills/skills/accessibility-auditor/SKILL.md

accessibility-auditor

Skill2 starsChanged 4 months agoMITView on GitHub

Audits web interfaces against WCAG 2.2 AA — semantics, keyboard operability, focus management, contrast, forms, ARIA, motion and screen-reader experience — and reports each violation with its success criterion, affected users and a corrected code snippet. Use when the user asks about accessibility, a11y, WCAG, screen readers, keyboard navigation, colour contrast, ARIA attributes, the European Accessibility Act, or wants an HTML/JSX component reviewed for inclusive design.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use for: native mobile a11y APIs (different criteria) or PDF remediation.

    line 26
  2. Distinctive:

    Test with the mouse unplugged.

    line 62
  3. Distinctive:

    No keyboard trap: you can always Tab and Shift+Tab out.

    line 69
  4. Very specific:

    Never start alt text with "image of".

    line 89
  5. Very specific:

    Every input has a programmatically associated <label for>.

    line 94
  6. Very specific:

    Use correct type and autocomplete tokens (1.3.5).

    line 100
  7. Distinctive:

    Do not disable the submit button until valid — users get no feedback why.

    line 102

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

Audit for the people affected, not for a scanner score. Automated tools catch roughly a third of real barriers.

When to use

Component and page review, remediation planning, VPAT/compliance preparation, design-system checks, EAA/Section 508 questions.

Do not use for: native mobile a11y APIs (different criteria) or PDF remediation.

Workflow

1. Run the automated pass first

python3 scripts/a11y_lint.py page.html --level AA --format md

It catches missing alt text, unlabelled controls, heading skips, duplicate ids, missing lang, tabindex > 0, invalid ARIA and low-contrast inline styles. Everything it reports is a real defect; everything it misses may still be one.

2. Semantics — the foundation

Most a11y bugs are a <div> doing a real element's job.

Instead ofUseWhy
<div onclick><button>Keyboard, focus, role, Enter/Space — all free
<div class="link"><a href>Navigable, announced as a link, opens in new tab
<b> / <span class="h2"><h2>Screen-reader users navigate by heading
<div class="list"><ul>/<li>Announces "list, 5 items"
Layout <table>CSS grid/flexTables are announced as data
<div role="button" tabindex="0"><button>ARIA adds semantics but no behaviour

Landmarks: one <main>, plus <header>, <nav>, <footer>, <aside>. Label duplicates: <nav aria-label="Breadcrumb">. Headings form an outline — exactly one <h1>, never skip a level for styling.

First rule of ARIA: don't use ARIA. A native element beats role + tabindex + key handlers every time. Bad ARIA is worse than none.

3. Keyboard operability (WCAG 2.1.1, 2.4.3, 2.4.7, 2.4.11)

Test with the mouse unplugged. Tab through the whole page.

  • Everything interactive is reachable and activatable by keyboard.
  • Focus order matches visual order. Never tabindex greater than 0.
  • Focus indicator is always visible: minimum 3:1 against the adjacent colour, at least 2 px thick. Never outline: none without a replacement.
  • Focus is never obscured by a sticky header or cookie banner (2.4.11, new in 2.2).
  • No keyboard trap: you can always Tab and Shift+Tab out.
  • A "Skip to main content" link is the first focusable element.
  • Modals: move focus in on open, trap it inside, close on Escape, return focus to the trigger on close, and mark background content inert.
  • Menus/comboboxes: arrow keys move within, Tab moves out — follow the ARIA Authoring Practices pattern for the widget you are building.

4. Text alternatives and media

ContentAlternative
Informative imagealt describing the information, not the picture
Decorative imagealt="" — empty, never missing
Functional image (icon button)alt / label describing the action
Complex chartShort alt + a full description or a data table nearby
Image of textAvoid entirely; use real text
VideoCaptions (1.2.2) + audio description (1.2.5)
AudioTranscript
Icon-only buttonaria-label, plus aria-hidden="true" on the glyph

Never start alt text with "image of". Never leave alt off — a missing attribute makes screen readers read the filename.

5. Forms (1.3.1, 3.3.1–3.3.4)

  • Every input has a programmatically associated <label for>. Placeholder is not a label — it disappears on input and usually fails contrast.
  • Group related controls with <fieldset> + <legend>.
  • Errors: identify the field in text, describe how to fix it, associate via aria-describedby, and announce with a live region. Never colour alone.
  • Mark invalid fields with aria-invalid="true".
  • Use correct type and autocomplete tokens (1.3.5).
  • Required fields marked in text or required, not by an unexplained asterisk.
  • Do not disable the submit button until valid — users get no feedback why.

6. Colour, contrast, motion

CriterionRequirement
1.4.3 Contrast4.5:1 body text; 3:1 for ≥ 24 px, or ≥ 19 px bold
1.4.11 Non-text contrast3:1 for UI borders, icons, focus rings, chart segments
1.4.1 Use of colourColour is never the only carrier of meaning — add text, icon or pattern
1.4.4 ResizeUsable at 200 % zoom without loss of content
1.4.10 ReflowNo horizontal scroll at 320 px width
1.4.12 Text spacingSurvives increased line-height and letter-spacing
2.3.1 FlashesNothing flashes more than 3×/second
2.2.2 MotionAuto-playing motion over 5 s can be paused; honour prefers-reduced-motion
2.5.8 Target sizeMinimum 24 × 24 px, or adequate spacing (WCAG 2.2)

7. Dynamic content

Announce async changes with a live region: aria-live="polite" for status, "assertive" only for errors that must interrupt. The container must exist in the DOM before the content is injected. Route changes in SPAs must move focus to the new page heading and update the document title — otherwise screen-reader users have no idea anything happened.

8. Report

Sort by severity: Blocker (a user group cannot complete the task) → Serious → Moderate → Minor. Each finding: criterion (number + name), location, who is affected and how, current code, fixed code, effort.

Worked example

<div class="btn" onclick="submitForm()">
  <img src="check.svg"> Submit
</div>
<span style="color:#e74c3c">Please fix the errors above</span>

A-01 · Blocker · 2.1.1 Keyboard — a <div> is not focusable or activatable by keyboard. Keyboard and screen-reader users cannot submit the form at all.

A-02 · Serious · 1.1.1 Non-text Content — the icon has no alt; screen readers announce "check.svg".

A-03 · Serious · 4.1.3 Status Messages — the error text is injected without a live region and is never announced.

A-04 · Moderate · 1.4.1 Use of Colour — the error is conveyed by red text alone, with 3.1:1 contrast on white (fails 1.4.3).

Fixed

<button type="submit" class="btn">
  <img src="check.svg" alt="" aria-hidden="true"> Submit
</button>

<div role="alert" class="form-error">
  <svg aria-hidden="true" focusable="false"><!-- warning icon --></svg>
  <strong>Error:</strong> Please fix the 2 errors listed above.
</div>

.form-error uses #c0392b on #fff (5.9:1), carries an icon and the word "Error", and role="alert" announces it on insertion.

Quality checklist

  • Every finding cites a numbered WCAG 2.2 success criterion
  • Impact described in terms of a real user, not "fails the scanner"
  • Full keyboard walkthrough performed, not just the automated scan
  • Focus visibility, order and trapping verified
  • Native elements preferred over ARIA in every fix
  • Contrast ratios computed, not eyeballed
  • Fixed code snippet supplied for each finding
  • Findings prioritised by severity, with an effort estimate
  • Screen-reader testing recommended (NVDA/JAWS on Windows, VoiceOver on macOS/iOS)

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.