---
title: "Check accessibility in every build · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/non-functional-tests/accessibility-in-ci
updated: 2026-10-20
licence: "All rights reserved"
---

# Check accessibility in every build

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Non-functional tests](https://agentwranglers.se/playbook/testing/non-functional-tests)
- Rule: Run an automated accessibility check on every page or screen in the test suite, and fail the build on any violation.
- 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, so also test with a keyboard and a screen reader before big releases. The [accessibility chapter](https://agentwranglers.se/playbook/website/accessibility) lists what to check.
- Check: Add an image without alt text on a branch. The browser suite fails and names the element.

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
# 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
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers testing playbook: https://agentwranglers.se/playbook/testing/non-functional-tests/accessibility-in-ci`.

- Previous: [Test load against a budget](https://agentwranglers.se/playbook/testing/non-functional-tests/load-tests)
- Next: [Grade AI features against fixed examples](https://agentwranglers.se/playbook/testing/non-functional-tests/llm-evals)
- [Non-functional tests](https://agentwranglers.se/playbook/testing/non-functional-tests)
