Factory.ai

AI Coding Agents

Testing

Accessibility testing with coding agents

September 24, 2026 - 2 minute read

Accessibility testing with coding agents works best as a layered review. Static rules can catch missing labels and invalid relationships. Browser automation can exercise keyboard flows and inspect the accessibility tree. Human evaluation still matters for meaning, usability, and assistive-technology behavior that automated checks cannot judge reliably.

The W3C Web Accessibility Initiative explains that evaluation tools can assist review, but no tool can determine accessibility on its own. A coding agent should gather repeatable evidence and fix clear defects without turning a clean scanner result into a broad compliance claim.

Turn accessibility requirements into testable behavior

Start with the affected user flow and the relevant WCAG 2.2 success criteria. Translate each requirement into an observable check. A dialog should receive focus when it opens, keep keyboard focus inside while active, expose its name and role, close with Escape when appropriate, and return focus to the control that opened it.

Include viewport, browser, theme, input method, and authentication state in the task. Name the components and routes in scope. Ask the agent to preserve product behavior and visual intent while changing semantics. Broad instructions such as "make the page accessible" invite unrelated edits and provide no finish line.

Use repository guidance to define the approved component system and validation commands. Factory's AGENTS.md support lets teams keep those rules close to the code, including directory-specific instructions and required checks.

Combine code checks with browser evidence

Run the project's accessibility linter and deterministic browser scanner first. These checks are fast and produce stable findings. Review each result in context because hidden content, custom widgets, and application state can affect whether a rule applies.

Then drive the critical path using only the keyboard. Check focus order, visible focus, skip links, menus, dialogs, error recovery, and dynamic updates. Inspect names, roles, states, and relationships in the accessibility tree. Resize or zoom the page when layout changes could obscure controls or cause content loss.

Factory's Automated QA uses an isolated browser to navigate flows, capture accessibility-tree snapshots, and produce screenshots as review evidence. Scope the run from the code diff so a small component change does not trigger an unfocused crawl of the entire product.

Separate fixes from compliance decisions

The coding agent can repair deterministic defects such as an unlabeled input, broken heading order, missing focus management, or a control implemented with the wrong element. It should avoid guessing at alternative text, reading order, or interaction intent when product context is missing. Those cases need a designer, content owner, or accessibility specialist.

Record the route, starting state, interaction steps, expected result, actual result, and captured evidence. Include the exact scanner and version used. If a check is blocked by authentication, test data, or an unavailable assistive technology, mark it blocked rather than passed.

Keep review independent. The same agent may implement and run deterministic checks, but a reviewer should inspect the evidence and sample the changed flow. For recurring coverage, Factory Custom Automations can launch QA from a GitHub event or schedule. Human testing remains part of the release process for high-impact journeys.

Further reading

Ready to build the software of the future?

Start building

Arrow Right Icon