For Agents
A growing share of digital content is written, styled, and described by AI agents and code assistants. This section is for them, and for the people who direct them. Everything here comes in a form a machine can act on and a form a person can check.
The idea
An agent that writes HTML, generates an image, or drafts a paragraph is a maker, and the same rule applies: it is shipping to someone it will never meet. Most accessibility guidance assumes a human reader with time to interpret it. The guidance here is written to be executed.
Machine-readable
- rules.json. Forty-three rules with stable ids (
AW-ALT-001and so on), a severity, a test method, a fix, and a link to the human note. CC0. - agents.md. The same rules as a checklist in prose, plus the alt text decision procedure and the focus state procedure. Fetch it, put it in context, follow it.
- numbers.json. Every threshold on this site (contrast 4.5, 3 and 7; targets 24 and 44; zoom 400 percent and 320 px; and the rest), one line each with the rule id and links. CC0.
- llms.txt. A one-page map of the site for agents and agent-driven search.
- Test corpus. Thirty-eight small HTML pages with planted, labeled violations, and the 65 findings an agent should report for each. Page 14 is clean on purpose, and page 33 has only exempt targets. Score with
node score.mjs your-findings.jsonfrom the corpus folder; it prints precision, recall, misses, and a per-rule breakdown. README.
Human-readable
- How an agent should decide on alt text. Five questions in the order that produces the fewest wrong answers.
- A checklist for code-generating assistants. Eighteen checks to run before returning HTML or CSS, each tied to a rule id and a corpus page.
- Why agents miss focus states. The three-step procedure that works without a browser, and the one CSS rule that passes everywhere.
Numbers at a glance
The thresholds a check compares against, one line each, with the rule id and the pages that explain and demonstrate them. The same list is at numbers.json for an agent to fetch.
| Value | Unit | Applies to | Level | Rule | Read |
|---|---|---|---|---|---|
| 4.5:1 | contrast ratio | normal text against its background | AA, 1.4.3 | AW-COLOR-001 | note · lab |
| 3:1 | contrast ratio | large text (24 px, or 18.66 px bold) against its background | AA, 1.4.3 | AW-COLOR-001 | note · lab |
| 3:1 | contrast ratio | borders, icons, and focus indicators against adjacent colors | AA, 1.4.11 | AW-COLOR-003 | note · lab |
| 7:1 | contrast ratio | normal text, enhanced | AAA, 1.4.6 | AW-COLOR-001 | note · lab |
| 24 x 24 | CSS px | pointer targets, or a 24 px circle on a smaller target that meets no other target | AA, 2.5.8 | AW-TARGET-001 | note · lab |
| 44 x 44 | CSS px | pointer targets, enhanced; no spacing exception | AAA, 2.5.5 | AW-TARGET-002 | note · lab |
| 400 | percent zoom | content reflows without two-dimensional scrolling | AA, 1.4.10 | none | note · lab |
| 320 | CSS px | the viewport width that 400 percent zoom of a 1280 px window produces | AA, 1.4.10 | none | note · lab |
| 0 | tabindex | the highest tabindex a page should use; positive values reorder focus | AA, 2.4.3 | AW-KEY-002 | note · lab |
| entirely | obscured | a focused element must not be entirely hidden by author content; not hidden at all for AAA (2.4.12) | AA, 2.4.11 | AW-FOCUS-004 | note · lab |
| 5 | seconds | anything that moves or auto-updates for longer can be paused, stopped, or hidden | A, 2.2.2 | AW-MEDIA-001 | note · lab |
| 150 | characters | a rough ceiling for alt text; longer descriptions go beside the image | guidance, not a criterion | AW-ALT-003 | note · lab |
Three rules to start with
- Alt text is a decision about context, not a description of pixels. Ask what the image is doing on this page before describing what it contains. If it does nothing, the alt is empty.
- A focus state must be visible on every background it can land on. One outline color is not enough. Use two tones, and never remove the outline without replacing it in the same rule.
- Verify, do not assume. Before returning HTML or CSS, check contrast for every text and non-text pair you introduced, and tab through what you built.
Using this material
Everything in this section is CC0. Quote rule ids, copy the corpus into your evaluation suite, and link the specific note or lab rather than the home page when an agent cites it. If your agent gets a corpus page wrong in a way you think the corpus got wrong, say so through the form.
Building an accessibility agent?
Tell us what guidance would help and what your agent gets wrong today.
Request guidance