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-001 and 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.json from the corpus folder; it prints precision, recall, misses, and a per-rule breakdown. README.

Human-readable

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.

Thresholds, where they apply, and where to read more
ValueUnitApplies toLevelRuleRead
4.5:1contrast rationormal text against its backgroundAA, 1.4.3AW-COLOR-001note · lab
3:1contrast ratiolarge text (24 px, or 18.66 px bold) against its backgroundAA, 1.4.3AW-COLOR-001note · lab
3:1contrast ratioborders, icons, and focus indicators against adjacent colorsAA, 1.4.11AW-COLOR-003note · lab
7:1contrast rationormal text, enhancedAAA, 1.4.6AW-COLOR-001note · lab
24 x 24CSS pxpointer targets, or a 24 px circle on a smaller target that meets no other targetAA, 2.5.8AW-TARGET-001note · lab
44 x 44CSS pxpointer targets, enhanced; no spacing exceptionAAA, 2.5.5AW-TARGET-002note · lab
400percent zoomcontent reflows without two-dimensional scrollingAA, 1.4.10nonenote · lab
320CSS pxthe viewport width that 400 percent zoom of a 1280 px window producesAA, 1.4.10nonenote · lab
0tabindexthe highest tabindex a page should use; positive values reorder focusAA, 2.4.3AW-KEY-002note · lab
entirelyobscureda focused element must not be entirely hidden by author content; not hidden at all for AAA (2.4.12)AA, 2.4.11AW-FOCUS-004note · lab
5secondsanything that moves or auto-updates for longer can be paused, stopped, or hiddenA, 2.2.2AW-MEDIA-001note · lab
150charactersa rough ceiling for alt text; longer descriptions go beside the imageguidance, not a criterionAW-ALT-003note · lab

Three rules to start with

  1. 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.
  2. 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.
  3. 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