accessibility-basics
Skill0 starsChanged 29 days agoMITView on GitHub
Check and fix accessibility of a web UI: contrast, never colour alone, keyboard use, visible focus, real controls, labels and names, structure, touch targets, zoom, motion, announcements. Use when building or reviewing any screen, form, dialog or control.
In this repository12 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- approvalsSkill
- backlog-itemSkill
- component-statesSkill
- department-briefSkill
- forms-feedbackSkill
- grill-before-buildSkill
- handoffSkill
- layout-and-hierarchySkill
- release-checklistSkill
- theme-token-auditSkill
- ui-review-checklistSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Check light and dark, and phone width (about 375 px).
- Distinctive: line 24
Keyboard: Every action is reachable with Tab, in an order that matches the visual order.
- Very specific: line 31
Names: Every icon-only button has an accessible name (aria-label or visible text).
- Distinctive: line 57
Read the DOM of controls you doubt for role, name and state.
- Distinctive: line 58
Use test data only; keep real customer data, emails and keys out of screenshots.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Accessibility basics
Apply to any new or changed screen, panel, dialog, form or control, and when reviewing a screen from real screenshots. Pair it with ui-review-checklist.
Ground rules
- Fix problems in your own components or theme file; do not patch a vendored design system in place.
- Colours come only from design tokens. If a token pair fails contrast, propose a different existing token, not a new hardcoded colour.
- Check light and dark, and phone width (about 375 px).
Checklist
- Contrast. Body text about 4.5:1 against its background, large text and meaningful icons about 3:1. Measure in both themes, including muted text, placeholders, disabled-looking text and text on coloured badges.
- Never colour alone. A status (error, done, waiting) also shows an icon, a word or a shape. Test by imagining the screen in greyscale.
- Keyboard. Every action is reachable with Tab, in an order that matches the visual order. Enter or Space activates buttons; Escape closes panels and dialogs.
- Focus. A visible focus ring on every interactive element, in both themes, never removed without a replacement. Opening a panel moves focus inside it; closing returns focus to the control that opened it. Dialogs keep focus inside while open.
- Real controls.
buttonfor actions,afor navigation,input/select/textareafor data. A clickabledivis a defect unless it has a role,tabindexand key handling, and even then prefer the real element. - Names. Every icon-only button has an accessible name (
aria-labelor visible text). Every input has a label tied to it, not only a placeholder. Meaningful images have alt text; decorative ones are hidden from assistive tech. - Structure. One
h1per screen, headings in order, lists as lists, landmarks (header,nav,main) present. The page title says where the user is ("Billing · Settings"). - Touch targets. Tappable areas at least 44 by 44 px on the phone layout, with space between neighbours so a thumb does not hit two.
- Zoom and reflow. At 375 px and at 200% zoom nothing is cut off, overlaps, or needs sideways scrolling (wide tables may scroll inside their own box). Text sizes are relative, not fixed tiny values.
- Motion. Respect
prefers-reduced-motion: no essential information only in animation, no auto-moving content that cannot be paused. - Live changes. Toasts, "saved" messages and errors that appear without a focus change are announced
(
role="status"for polite,role="alert"for urgent). Do not announce every background refresh. - Copy. Short, concrete, one action per button. Links and buttons say what happens ("Download invoice"), not "Click here".
Focus check: name the control that holds focus
In the focus check, first name which control holds focus (by its label or visible text), then say whether a visible ring is on THAT control. Reviewers often report a missing ring on the wrong element, for example on the email field when focus is actually on the "Show password" button beside it.
How to test
- Tab through the screen without a mouse, in both themes.
- Screenshot light and dark at desktop and 375 px (a headless browser works) on a local or staging build.
- Read the DOM of controls you doubt for role, name and state.
- Use test data only; keep real customer data, emails and keys out of screenshots.
How to report
One finding per problem, ranked by what it costs the user. Each has:
- Where: screen, element by its visible text, file.
- What: what is wrong, with a screenshot or measured value (for example "3.1:1 in dark").
- Why it matters: who is blocked (keyboard user, low vision, phone thumb) and what they cannot do.
- Fix: the smallest change, naming the existing token or component to use.
End with what you checked and what you could not check. Agreed fixes become tasks with acceptance criteria that cover both themes and phone width.
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
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.

