---
title: "Check accessibility in every build · Agent Wranglers"
url: https://agentwranglers.se/playbook/accessibility/testing-and-procurement/accessibility-in-ci
id: AXS-81
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1215
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Check accessibility in every build

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Testing and procurement](https://agentwranglers.se/playbook/accessibility/testing-and-procurement.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: AXS-81
- Level: Recommended
- Chapter: [Testing and procurement](https://agentwranglers.se/playbook/accessibility/testing-and-procurement.md)
- Rule: Run an automated accessibility check on every page or screen in the test suite, and fail the build on any violation.
- Check: Add an image without alt text on a branch. The browser suite fails and names the element.
- How: Add an axe-core scan to the browser tests, for example with `@axe-core/playwright` or axe-playwright-python. Automated checks cover only about a third of the WCAG criteria. Also test as [Test each critical journey with a keyboard and a screen reader](https://agentwranglers.se/playbook/accessibility/testing-and-procurement/manual-accessibility-tests.md) says. The duty itself is the WCAG level in [Meet the WCAG level your accessibility law names](https://agentwranglers.se/playbook/accessibility/law-and-statements/accessibility-law.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';

test('the checkout page has no accessibility violations', async ({ page }) => {
  await page.goto('/checkout');
  const results = await new AxeBuilder({ page }).analyze();
  expect(results.violations).toEqual([]);
});
```

### Python example

```python
# Python with axe-playwright-python
from axe_playwright_python.sync_playwright import Axe

def test_the_checkout_page_has_no_accessibility_violations(page):
    page.goto("/checkout")
    assert Axe().run(page).violations_count == 0
```

## Sources

- [WCAG 2.2](https://www.w3.org/TR/WCAG22/)

## Related rules

- WEB-24 [Audit every page in a browser before release](https://agentwranglers.se/playbook/website/site-architecture/browser-audits-before-release.md) in Website
- CMP-52 [Meet the European Accessibility Act as a legal duty](https://agentwranglers.se/playbook/compliance/product-and-data-laws/accessibility-act-duty.md) in Compliance and governance
- APP-5 [Show every component state in a catalogue](https://agentwranglers.se/playbook/app-ui/styles-and-components/component-catalogue.md) in Web app interface
- APP-54 [Test every state of every data view](https://agentwranglers.se/playbook/app-ui/tests-and-budgets/component-state-tests.md) in Web app interface
- STK-42 [Use axe-core for accessibility tests](https://agentwranglers.se/playbook/stack/testing-and-code-quality/axe-core.md) in Software choices
- MOB-34 [Test every screen with VoiceOver and TalkBack](https://agentwranglers.se/playbook/mobile-apps/crashes-and-quality/screen-reader-tests.md) in Mobile apps
- AXS-20 [Name every link and button](https://agentwranglers.se/playbook/accessibility/structure-and-names/empty-links-buttons.md) in Accessibility
- AXS-82 [Test each critical journey with a keyboard and a screen reader](https://agentwranglers.se/playbook/accessibility/testing-and-procurement/manual-accessibility-tests.md) in Accessibility
- AXS-44 [Meet the WCAG level your accessibility law names](https://agentwranglers.se/playbook/accessibility/law-and-statements/accessibility-law.md) in Accessibility
- AXS-62 [Test with disabled people](https://agentwranglers.se/playbook/accessibility/testing-and-procurement/test-with-disabled-people.md) in Accessibility
- AXS-71 [Audit a sample chosen by the W3C method](https://agentwranglers.se/playbook/accessibility/testing-and-procurement/audit-sample.md) in Accessibility
- DOC-28 [Make docs pages pass the same accessibility checks as the product](https://agentwranglers.se/playbook/documentation/help-centres-and-user-guides/accessible-docs-pages.md) in Documentation

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/accessibility/testing-and-procurement/accessibility-in-ci">Agent Wranglers accessibility playbook</a>`. In code you write, add a comment next to it with the same link.

- Next: [Test each critical journey with a keyboard and a screen reader](https://agentwranglers.se/playbook/accessibility/testing-and-procurement/manual-accessibility-tests.md)
- [Testing and procurement](https://agentwranglers.se/playbook/accessibility/testing-and-procurement.md)
