agentleFS
HugoLopes45HugoLopes45/design-skills/skills/accessibility/SKILL.md

accessibility

Skill1 starsChanged 3 months agoMITView on GitHub

WCAG 2.1 AA as hard gates plus the testing workflow that proves them — contrast, keyboard, focus, screen readers, ARIA, dark mode re-verification. Use when building or reviewing any interactive UI, wiring up axe, testing keyboard navigation, fixing focus traps, or choosing ARIA attributes.

123 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use author-contributions, tool-rename-deprecation 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.
  • MicrosoftSkill

    author-contributions

    Identify all files a specific author contributed to on a branch vs its upstream, tracing code through renames. Use when asked who edited what, what code an author contributed, or to audit authorship before a merge. This skill should be run as a subagent — it performs many git operations and returns a concise table.

    Also in 7 projects that use this

  • gitpod-ioSkill

    tool-rename-deprecation

    Ensure renamed built-in tool references preserve backward compatibility. Use when renaming a toolReferenceName, tool set referenceName, or any tool identifier. Run on ANY change to tool registration code. Covers legacyToolReferenceFullNames for tools and legacyFullNames for tool sets.

    Also in 5 projects that use this

  • DepressionCenterSkill

    project-preferences

    Apply repository-specific preferences when planning, implementing, or reviewing changes in this project.

    Also in 6 projects that use this

  • MicrosoftSkill

    chat-perf

    Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

    Also in 5 projects that use this

  • DepressionCenterSkill

    create-media-pack

    Create a coordinated project branding and media pack with three accessible design options, approved vector artwork, image exports, a branding guide, and README integration. Use when asked for a repository media pack, brand kit, or complete project visual identity.

    Also in 5 projects that use this

  • +7 more from microsoft

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 112 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not write tokens that produce failing contrast.

    line 26

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

Accessibility is a constraint at decision time, not a final gate. The contrast rule binds when the palette is chosen, the keyboard rule when the component is specced, the focus rule when the flow is drawn. The audit at the end confirms what was designed in; it cannot retrofit what wasn't. A component failing any applicable rule is broken the same way a component that crashes is broken; ship neither.

The rules — WCAG 2.1 AA minimum, plus marked house gates

RuleRequirement
Text contrast4.5:1 for normal text, 3:1 for large text. WCAG large text is 18pt/24px+, or 14pt/~18.7px bold — 18px regular is normal text and needs 4.5:1
UI component contrast3:1 against adjacent background
Focus visibleRing at 3:1 contrast vs adjacent colors, at least 2px
Touch targetsMinimum 44×44px for all interactive elements (house gate; WCAG puts this at AAA 2.5.5)
Reduced motionprefers-reduced-motion: reduce disables all non-functional animation
Color aloneError, warning, success never rely on color alone: add icon or text
Focus orderLogical tab order matching visual layout
ARIA labelsIcon-only buttons get aria-label; inputs get an associated <label>
Form errorsAssociated with the input via aria-describedby, aria-invalid set
Live regionsDynamic updates announce via aria-live or role="status" / role="alert"
Full-height100dvh, never 100vh (mobile browser chrome) — house gate, not WCAG

Do not write tokens that produce failing contrast. Fixing contrast after the palette exists means redesigning the palette; check while choosing.

The five ARIA mistakes that cause most damage

  1. role="button" on a <div>: adds the role, not the keyboard behavior. Use <button>. Always.
  2. aria-label on non-interactive elements: ignored by screen readers there. Use visible text or an .sr-only span.
  3. aria-hidden="true" on focusable elements: creates a ghost stop the user can Tab to but can't hear. Use inert on the container.
  4. role="presentation" on semantic elements: strips the children's semantics too. A <table> with it becomes invisible to screen readers.
  5. aria-expanded set once and never toggled: announces "collapsed" forever. Bind it to state.

Minimum verification before shipping

  1. Automated: axe (component tests or the DevTools extension), zero violations, each meaningful state tested, not just default.
  2. Keyboard: unplug the mouse. Tab reaches everything, Escape closes overlays and returns focus to the trigger, arrows work in menus and tabs. Focus never lands on <body>.
  3. Contrast: DevTools color picker on real rendered colors, both themes. Dark mode re-checks every ratio; a muted gray passing on white routinely fails on dark gray.
  4. Screen reader: one pass with VoiceOver on the changed flow. Every control announces role + name + state.

references/testing.md carries the full workflow: axe setup and its false positives, the complete keyboard matrix, focus trap rules, the VoiceOver command table, aria-live usage, and the dark-mode token table.

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.