What should an AI agent do in accessibility testing?
An AI agent for accessibility testing sorts results, groups them and drafts fixes. The scanner detects. A person decides.
Split the work three ways:
- Automated scanning detects. It runs the same rules the same way on every build, so a result this week can be compared with last week's.
- The AI agent triages. It reads the scanner's results, removes duplicates, groups them by template and component, flags likely false positives for a person to confirm, and drafts fixes for review.
- People judge. Keyboard and screen-reader passes, content quality and anything an agent flags as uncertain go to a person.
Then report the results in three separate buckets, machine-verified, needs a person and untested, so a missing finding is never read as evidence that a page works for everyone.
Who does what
| Job | Automated scanning | AI agent | People |
|---|---|---|---|
| Find detectable rule failures on every build | Owns it. Deterministic, versioned, comparable over time | Doesn't decide pass or fail | Spot-checks the scanner's configuration |
| Remove duplicates and group by template or component | Reports raw results | Owns it | Reviews the grouping on a sample |
| Sort real failures from false positives | Marks some results as needing review | Proposes, with reasoning | Confirms every suppression |
| Draft code fixes | n/a | Drafts them as pull requests | Reviews and merges |
| Keyboard and screen-reader task testing | n/a | Can simulate parts between releases | Owns it |
| Judge meaning: alt text, headings, link text, error wording | Finds missing ones only | Can suggest, can't approve | Owns it |
| Linked PDFs and other documents | Usually out of scope for a web page scan | Can inventory and triage | Checks reading order and tags |
| Explain progress to leadership | Supplies the numbers | Drafts the narrative from those numbers | Signs off |
The rule that holds this together: every number in a report comes from the scanner or from a recorded human result, never from the model.
What can automated accessibility testing detect in WCAG 2.2?
Level AA in WCAG 2.2 means meeting 55 success criteria, 31 at Level A and 24 at Level AA [1]. Our WCAG 2.2 checklist marks 23 of the 55 as having at least one automated rule, and every one of those is only partly checkable. The other 32 need human or behavioral testing.
"Partly" matters. A rule decides one detectable failure, not the whole criterion:
| Criterion | What automated rules can decide | What still needs a person or a task test |
|---|---|---|
| 1.1.1 Non-text Content | An image has no text alternative | Whether the alternative is accurate, or the image should be decorative |
| 1.4.3 Contrast (Minimum) | Text against a solid background is below the ratio | Text over images and gradients, and states such as hover and focus |
| 2.4.4 Link Purpose (In Context) | A link has no accessible name | Whether twelve links all named "Read more" make sense in context |
| 2.5.8 Target Size (Minimum) | Many undersized targets, measured in the browser | Whether an exception applies, for example a target inline in a sentence |
| 4.1.2 Name, Role, Value | A control has no name or an invalid role | Whether its state is announced correctly as it changes |
| 2.4.3 Focus Order | No automated rule in our checklist | Whether focus moves into a dialog and back, and follows the task |
| 2.1.2 No Keyboard Trap | No automated rule in our checklist | Whether Tab can get out of every widget it gets into |
| 2.4.11 Focus Not Obscured (Minimum) | No automated rule in our checklist | Whether sticky headers or banners hide the focused element |
| 3.3.1 Error Identification | No automated rule in our checklist | Whether errors after a failed submit are tied to their fields and announced |
| 4.1.3 Status Messages | No automated rule in our checklist | Whether "Added to cart" or "3 results" is announced without moving focus |
Published studies point the same way. In a 2017 test by the UK Government Digital Service, ten automated tools combined found 71% of 143 deliberately introduced barriers on one page, and the best single tool found 37% counting its errors and warnings [2]. The W3C puts it plainly: evaluation tools "can not determine accessibility, they can only assist in doing so" [3]. There's more detail on the gap in why your site passes automated scans but fails real screen reader users.
Where an agent fits. An agent with a browser can do things a rule can't, such as following a task or reading a page in order. Treat what it finds there as a lead for a person, until someone confirms it. The same request on the same page can produce a different answer on another run, which is why its findings stay in "needs a person" until then.
What does a pass really mean?
A passed automated check means the rules that ran found nothing they could detect. It is not evidence that a success criterion is met.
The W3C's Accessibility Conformance Testing (ACT) Rules Format, the standard way to write automated accessibility rules, says so for a rule written to test a requirement. When that rule fails, the requirement isn't satisfied. When every outcome is passed or inapplicable, the requirement "could be satisfied or further testing is needed" [4]. WebAIM says the same about its own large-scale automated testing: the absence of detected errors "does not indicate that a page is accessible or conformant" [5].
So, in reports and in conversation:
- "Passed" means the rules that ran found nothing on the states they saw. Say "no detectable failures", not "accessible".
- "Inapplicable" means there was nothing for the rule to test, such as a page with no video under a captions rule. It isn't a pass.
- "Not tested" has to look different from both. A rule that didn't run, a step a journey never reached or a template nobody has reviewed must never be counted as passing.
We apply the same principle in our own product: the per-page score is withheld when a page couldn't be fully evaluated, and in a screen-reader journey the steps after a break are marked "not evaluated", never passed.
How should you handle false positives?
Some results that look like failures aren't, and some results a rule engine can't decide are reported as "needs review" rather than as failures. Common sources:
- text over a background image or gradient, where a rule can't determine the background color;
- content that is hidden or off-screen at the moment of the scan;
- a page captured mid-load, or in a state real users don't see;
- markup injected by a third-party script you don't control. That's still a real barrier for your visitors, but the fix belongs with whoever supplies the script.
This is where an agent saves the most time, as long as the decision stays with a person:
- The agent proposes. For each candidate it writes down the rule, the element, the page state and why it thinks the result is wrong.
- A person confirms, ideally someone who can check the element with a keyboard and a screen reader.
- Record it narrowly: rule, selector or component, template, reason, approver and a re-check date. Store it in the repo next to the CI configuration so changes go through review.
- Re-check on change. When the component changes, the suppression expires and the result comes back.
Never turn a rule off site-wide because one instance was a false positive. That hides every real instance too.
How do you run accessibility testing at scale?
The steps below assume a site of a few hundred URLs, built from a smaller number of templates and shared components.
1. Inventory by template
Export your URL list from the sitemap or CMS and tag each URL with the template or layout that renders it: product page, article, search results, account settings, checkout step. Most accessibility defects live in templates and shared components, so this is the unit you test, triage and report on. Add the critical tasks too, such as sign-up, sign-in, search and checkout, and list every linked PDF or other document as its own item.
2. Choose a sample
The W3C's evaluation methodology, WCAG-EM, describes how to choose pages for an evaluation: a structured sample that reflects the site's common views, essential functionality and types of pages, a randomly selected sample to check that the structured one is representative, and complete processes such as a whole checkout [6]. Applied to a large site, that means:
- two or three URLs per template, picked for variety (a short and a long article, a product with and without variants);
- a random handful of URLs on each cycle, so the sample doesn't go stale;
- every step of each critical task, end to end.
Scan beyond the sample if your tooling makes it cheap. The sample is what drives the expensive work: human passes and agent triage.
3. Run automated scanning in CI
Scan the sample on every pull request against a preview build, and run the full URL list on a schedule. Pin the rule engine's version and configuration in the repo so a change in results means a change in your site, not in the tool. When you do upgrade, re-baseline in its own pull request.
Gate on new failures, not the total count. A ratchet that blocks regressions and lets the baseline shrink over time is something teams keep switched on. A gate that fails on hundreds of old issues gets switched off.
4. Let the agent triage the results
Give the agent the raw results (JSON, not screenshots) and ask it to:
- dedupe instances of the same rule on the same component across URLs;
- group them by template and component, so one shared header fix closes the same issue on every page;
- map each group to its WCAG success criterion;
- propose false positives with reasoning, for a person to confirm;
- rank by what blocks a task first, for example an unlabeled field in checkout before a contrast issue in a footer.
Two guardrails. The agent reads results; it doesn't change them or mark anything as passed. And page content is untrusted input: text and markup in scan results come from the pages, so treat them as data and never as instructions to the agent.
5. Draft fixes, review them, verify them
Have the agent open small pull requests, one component or one pattern per pull request, with the criterion and the original result in the description. A person reviews each one. After merge, the next scan confirms the result is gone, and a human pass confirms the experience actually improved.
6. Keep keyboard and screen-reader passes human
See sampling, documents and human passes below.
7. Report in three buckets
See reporting to leadership below.
How do you run automated accessibility testing in CI?
This example uses GitHub Actions with placeholder scripts. a11y-scan.sh wraps whichever automated rule engine you use, run in a real browser, and a11y-compare.sh compares results with the committed baseline. Adapt the names to your stack.
name: accessibility
on:
pull_request:
schedule:
- cron: "0 6 * * 1" # full URL list, weekly
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and start a preview
run: |
npm ci
npm run build
npm run start &
./scripts/wait-for-url.sh http://localhost:3000
- name: Run automated scanning
run: |
LIST=a11y/sample-urls.txt
if [ "${{ github.event_name }}" = "schedule" ]; then LIST=a11y/all-urls.txt; fi
./scripts/a11y-scan.sh \
--base-url http://localhost:3000 \
--urls "$LIST" \
--standard wcag22aa \
--output a11y-results.json
- name: Fail on new failures only
run: |
./scripts/a11y-compare.sh \
--results a11y-results.json \
--baseline a11y/baseline.json \
--suppressions a11y/suppressions.yml \
--fail-on new
- uses: actions/upload-artifact@v4
if: always()
with:
name: a11y-results
path: a11y-results.jsonA sample list grouped by template keeps the results readable:
# template | path
product-detail | /products/basic-tee
product-detail | /products/gift-card
article | /blog/short-post
article | /blog/long-guide-with-tables
search-results | /search?q=shoes
checkout | /checkout/cart
checkout | /checkout/shipping
checkout | /checkout/paymentAnd each suppression records who approved it and when it expires:
- rule: text-contrast # the rule id your engine reports
selector: ".hero-banner h1"
template: home
reason: "Text sits on a solid overlay; the rule can't read the background image beneath it."
approved_by: "@qa-lead"
recheck_by: 2027-03-01Keep the results file as a build artifact. It's the raw material for the agent's triage and for the dashboards later.
If you use Accessible, scanning runs in a real browser against WCAG 2.0, 2.1 and 2.2 at the level you choose, on a weekly schedule on every paid plan, with a deploy trigger that re-scans when a release ships on Professional and Enterprise. See automated scanning.
How do you connect an agent, including Claude Code?
An agent works best on structured results it can query, rather than on a pasted report. Our connector for AI assistants, an MCP server, is one way to do that from Claude, Claude Code or ChatGPT. With access to your sites, the agent can list open issues for a site (from scans, journeys, CI and real-visitor monitoring) filtered by page and severity, open one issue with its WCAG criteria, selectors, markup and fix guidance, then check the page again after the fix and say what changed since the earlier report. The page checks work on one public page at a time. They don't crawl, sign in, or type into and submit forms, so they're for verifying a fix, not for scanning a site. Setup is in connect an assistant.
How do you sample pages, documents and human passes?
Sample by template, not by URL
A defect in a shared component appears on every page that uses it, and one fix clears it everywhere. Testing 500 URLs one by one mostly re-finds the same component issues. Testing each template well, plus the critical tasks end to end, finds them once. Re-sample when a template changes or a new one ships.
Don't forget linked PDFs
A web page scan generally doesn't open the documents a page links to, so PDFs, slide decks and spreadsheets drop out of reports unless you add them. Inventory them during step 1, with an owner for each. For each one, decide whether it should become an HTML page, which is often easier to keep accessible, or be fixed as a tagged PDF. The W3C publishes PDF techniques for WCAG, including text alternatives for images and correct tab and reading order [7], and its WCAG2ICT guidance covers how WCAG applies to non-web documents [8]. A dedicated PDF checker catches the structural problems; reading order and alternative text still need a person. Until a document has been reviewed, it belongs in the untested bucket.
Keep keyboard and screen-reader passes human
Many of the 32 criteria with no automated rule in our checklist are about behavior or judgment: where focus goes, what gets announced, whether a task can be finished and whether content makes sense. For each template and each critical task, on a regular cycle and whenever it changes:
- Keyboard pass. Tab through the page and the task with no mouse. Check that focus is visible, follows a logical order, isn't hidden behind sticky elements and never gets trapped. Method: how to test keyboard-only navigation.
- Screen-reader pass. Complete the task with NVDA, JAWS or VoiceOver, listening for names, roles, states, headings and status messages. Method: screen reader testing step by step.
- The usual suspects. Dialogs and drawers (focus management), live updates (ARIA live regions) and form errors after a failed submit.
Simulated checks are useful between human passes. Our screen-reader journeys run a task keyboard-only and report the step that breaks, and an agent can read a page's accessibility tree or walk its Tab order on request. These catch regressions early. They don't replace a person who uses assistive technology every day.
Record each pass as data: template or task, date, tester, assistive technology and browser, result, and the issues it raised. That record is what lets a template move from "untested" to "needs a person: done".
How should you report accessibility to leadership?
Leadership needs to know three things: what's broken, what's changing and what nobody has looked at yet. Keep the three buckets separate on every chart.
| Bucket | What goes in it | Where it comes from |
|---|---|---|
| Machine-verified | Detectable rule failures and their trend | The pinned automated scanner, every build and every schedule |
| Needs a person | Criteria with no automated rule, "needs review" results, agent-flagged leads, and the outcome of human passes | The human pass log and the triage queue |
| Untested | Templates, tasks, criteria and documents nobody has covered yet, including PDFs and areas behind a login | The inventory from step 1, minus everything above |
Three views cover most questions:
- By rule or success criterion. Open detectable failures per criterion over time, with new versus fixed per release. This shows whether regressions are getting through and whether the backlog is shrinking.
- By template. One row per template and critical task: open machine-verified issues, date of the last keyboard pass, date of the last screen-reader pass, open human findings. This shows where the risk sits and who owns it.
- Coverage. The share of templates, tasks and documents with a current human pass, and what's left in "untested". This is the number that stops a clean scan being read as the whole picture.
Avoid a single "accessibility score" for the whole site. It merges the three buckets and invites the question "are we done?", which no scan can answer. An agent can draft the weekly summary, as long as every figure in it is pulled from the data. If you use Accessible, paid plans include per-page scoring with trend history, a trend dashboard and CSV export, and real-user monitoring, free on one domain, adds which barriers real visitors actually met, ranked by how many of them met each one. More on how the layers fit together: static scans vs. simulated journeys vs. real user monitoring.
What mistakes should you avoid?
- Making the agent the scanner. Results that vary from run to run can't be trended or used as a CI gate.
- Reading a clean scan as a pass. It means no detectable failures, on the states the scanner saw.
- Suppressing rules site-wide. Suppress one instance, with a reason and a re-check date.
- Spreading human passes across every URL. Go deep on templates and critical tasks instead.
- Leaving documents and logged-in areas out of the inventory. Untested content should be visible as untested.
- Treating page content as instructions. Scan results contain text from the pages. Agents should treat it as data.
Sources
- Web Content Accessibility Guidelines (WCAG) 2.2 (opens in a new tab). W3C Recommendation. Conformance requirements, including full pages and complete processes, are in section 5.
- What we found when we tested tools on the world's least-accessible webpage (opens in a new tab). UK Government Digital Service, February 24, 2017. Independent; one deliberately inaccessible test page, 143 barriers, 10 tools.
- Selecting Web Accessibility Evaluation Tools (opens in a new tab). W3C Web Accessibility Initiative, updated May 13, 2024.
- Accessibility Conformance Testing (ACT) Rules Format 1.1 (opens in a new tab). W3C Recommendation, February 5, 2026.
- The WebAIM Million: The 2026 report on the accessibility of the top 1,000,000 home pages (opens in a new tab). WebAIM, March 30, 2026.
- WCAG Evaluation Methodology (WCAG-EM) 2.0 (opens in a new tab). W3C Group Note, July 23, 2026. Step 3: select a representative sample set.
- Techniques for WCAG 2.2: PDF Techniques (opens in a new tab). W3C Web Accessibility Initiative.
- Guidance on Applying WCAG 2 to Non-Web Information and Communications Technologies (WCAG2ICT) (opens in a new tab). W3C Group Note, December 11, 2025.