axe Accessibility Testing: Setup Guide, Code Examples & Honest Limits [2026]
Last updated: November 29, 2026
Axe accessibility testing means running axe-core β the open-source rule engine Deque Systems built and maintains β against a rendered page or component to catch WCAG violations a machine can prove exist. It's free, MPL-licensed, and already inside Lighthouse, Storybook, and most competing scanners, TestParty's own stack included. This guide covers the first scan, working jest-axe and Playwright code, honest rule configuration, the CI pattern, and β the part most vendors skip β exactly where a clean axe run stops meaning anything.
Key numbers: The open-source axe-core rule library maps its rules to the 55 Level A and AA success criteria in WCAG 2.2, and ships embedded in Google Lighthouse, Storybook's accessibility addon, and TestParty's own detection stack. Deque's own 2021 study of 13,000+ pages found automated testing identifies 57% of issues by volume, not by WCAG success criteria (Deque, 2021). In 2026, 95.9% of the top one million home pages carried a detectable WCAG failure, averaging 56.1 errors per page (WebAIM Million). Automated detection β the layer axe runs on β covers roughly 60β70% of accessibility issue volume in TestParty's remediation work across 100+ brands; the remaining 30% needs expert manual testing.
TestParty competes in this market. This guide uses public information and cited sources; evaluate all tooling against your own requirements.
What is axe and why did it become the standard?
Axe-core is the open-source, MPL-licensed rule engine Deque Systems built and still maintains β it became the industry default because it's tuned to near-zero false positives, only flagging what it can prove, which is also why it can't flag everything.
Deque released axe-core in 2017, and the project has since become the detection layer inside a surprising share of the industry: Google Lighthouse's accessibility category, Microsoft's Accessibility Insights, Storybook's a11y addon, and TestParty's own scanner all run axe-core rather than a homegrown engine. That consolidation is a design bet that won. Earlier-generation checkers erred toward flagging anything that might be a problem, burying real findings in noise a developer learned to ignore. axe-core's rules fail only on conditions the engine can prove violate a specific success criterion β a false positive is a bug to fix, not an acceptable cost of thoroughness. The tradeoff is symmetric: an engine built to never guess wrong also never guesses at anything it can't verify, which is why a clean axe run and a genuinely accessible page are not the same claim.
How do you run your first axe scan?
Install the free axe DevTools browser extension, open your browser's developer tools, scan the page you're viewing, and read the results grouped by impact β critical, serious, moderate, or minor β not by WCAG level.
Open DevTools, click the axe DevTools panel tab, and run "Scan all of my page." Results list by impact; click any violation to highlight the exact element and see the rule that failed, alongside a suggested fix. Impact and WCAG level aren't the same axis: impact is axe's heuristic for how much a violation likely affects a user, not which WCAG level it maps to β an AA criterion can register as "moderate," and a best-practice rule with no WCAG mapping can register as "serious." Read impact as a triage signal, not a compliance signal.
// Sample axe-core result entry β what a DevTools scan returns per violation.
{
"id": "color-contrast",
"impact": "serious",
"tags": ["wcag2aa", "wcag143"],
"description": "Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds",
"nodes": [
{ "target": [".size-chart-link"], "html": "<a class=\"size-chart-link\">Size chart</a>" }
]
}The free extension runs axe-core's complete rule set for manual, one-page-at-a-time scans β no seat limit, no trial clock. The paid layer above it adds workflow, not detection depth: see axe DevTools pricing for what that costs, or Deque axe alternatives for dev teams if you're deciding whether to replace the paid tier at all. Microsoft's free Accessibility Insights is worth installing alongside it β same engine, plus a guided manual-assessment mode the free tier here doesn't offer.
How do you put axe in your test suite?
Wire axe-core into two layers: `jest-axe` against isolated components, `@axe-core/playwright` against fully rendered pages β component tests run first and catch a regression before it's assembled into anything.
Component-level checks confirm one piece of UI in isolation:
// jest-axe: fails on violations of WCAG 4.1.2 (Name, Role, Value) and 1.4.3 (Contrast).
import { render } from '@testing-library/react';
import { axe, toHaveNoViolations } from 'jest-axe';
import WishlistButton from './WishlistButton';
expect.extend(toHaveNoViolations);
test('WishlistButton has no accessibility violations', async () => {
const { container } = render(<WishlistButton productId="1042" saved={false} />);
const results = await axe(container);
expect(results).toHaveNoViolations();
});Page-level checks catch what a component test never renders β layout, real data, a region that only exists once the page assembles. Scope with `.include()` to the region under test, not a whole page whose header and footer are covered elsewhere:
// @axe-core/playwright, scoped to the filter sidebar only β not the full page shell.
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('collection filter sidebar has no serious violations', async ({ page }) => {
await page.goto('/collections/best-sellers');
const results = await new AxeBuilder({ page })
.include('#filter-sidebar')
.withTags(['wcag2a', 'wcag2aa', 'wcag22aa'])
.analyze();
const blocking = results.violations.filter(v => ['critical', 'serious'].includes(v.impact));
expect(blocking, JSON.stringify(blocking, null, 2)).toHaveLength(0);
});Two patterns solve two problems. For a genuinely new component, assert zero violations, full stop. For a page getting a first-ever test, assert zero new violations against a stored baseline instead β a strict zero bar against inherited debt gets the test disabled within a sprint:
// Zero NEW violations, not zero violations β for a legacy page getting its first test.
import knownViolations from './a11y-baseline.json'; // accepted rule IDs, reviewed quarterly
test('legacy product page introduces no new violations', async ({ page }) => {
await page.goto('/products/legacy-jacket');
const results = await new AxeBuilder({ page }).analyze();
const newOnes = results.violations.filter(v => !knownViolations.includes(v.id));
expect(newOnes, JSON.stringify(newOnes, null, 2)).toHaveLength(0);
});How do you configure rules without cheating?
Configure axe with `runOnly` to scope a scan to specific WCAG tags, and treat every `rules` override that disables a check as a decision needing a written reason, an owner, and a review date β never a shortcut to a green build.
Scoping to WCAG levels keeps a scan focused on conformance-relevant rules rather than axe's broader best-practice set:
// Scopes a scan to WCAG 2.2 A/AA only β skips axe's best-practice-only rules,
// which aren't tied to a WCAG success criterion and can otherwise pad the count.
const results = await axe.run(document, {
runOnly: {
type: 'tag',
values: ['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa']
}
});The full tag and rule-ID reference lives in axe-core's API documentation. Disabling a rule or excluding markup is sometimes legitimate β never silent:
// Disabling a rule is a documented decision, not a shortcut β same for excluding markup you don't own.
const results = await axe.run(
{ exclude: [['#live-chat-iframe']] }, // third-party widget, not first-party code β ACC-118, owner @web-team, review 2027-01-15
{
rules: {
'landmark-one-main': { enabled: false } // theme renders two <main> regions during an A/B test β ACC-104, remove by 2026-Q1
}
}
);Exclusions belong on containers you don't own β a chat widget, a payment iframe β never your own templates. Severity gating (blocking on critical/serious, warning on moderate/minor) belongs at the CI layer, covered next.
How does axe fit CI?
Axe fits CI as a pull-request gate: the same `jest-axe` and Playwright checks above run in a GitHub Actions job that fails the build on a new critical or serious violation β the full pipeline wiring is a separate guide, not repeated here.
The pattern: install dependencies, build, run the `jest-axe` suite, start the app, run the Playwright suite against it, and fail the job on either suite's non-zero exit code. Accessibility in CI/CD: ship without regressions has the full GitHub Actions workflow, per-template thresholds, and the pipeline-level baseline pattern. Whatever gate you wire, treat Lighthouse 90+, WAVE errors at 5 or fewer, and axe violations at 3 or fewer as the regression floor β the convention behind TestParty's own remediation work β not proof the build is conformant, only that it hasn't gotten worse.
What are axe's limits?
Axe-core, like every automated scanner, catches roughly 60β70% of accessibility issue volume and stops there β the rest is judgment about meaning, not a markup condition any rules engine can evaluate.
Deque's own 2021 study (13,000+ pages) put automated detection at 57% of issues by volume β how often a failure type repeats, not the share of WCAG criteria a tool evaluates end to end. TestParty's operational number across 100+ brands lands at 60β70%; the gap is mostly methodology, not disagreement.
By design, axe doesn't flag whether alt text describes a product or just exists, whether Tab order follows the intended reading order, or whether a keyboard-only shopper can actually finish checkout β all judgment, and a rules engine evaluates markup, not meaning. In TestParty's audits of Shopify Plus stores already running axe-core in CI, the violations that reach production are almost never the ones axe flagged and a team ignored; they're the ones nothing running that day was ever going to catch.
A zero-violation run is a real, useful signal β not a conformance claim. Every scanner shares this ceiling; see our comparison of 11 WCAG testing tools by coverage. What fills the gap is a keyboard and screen-reader pass plus a recurring expert audit, not a bigger scanner β the full case is in manual vs. automated accessibility testing.
What happens after detection?
A violation axe reports is a finding, not a fix β someone still has to change the source, and that's the layer TestParty's PreGame and Bouncer sit on: one at write-time, one at the pull-request gate.
Disclosure: TestParty builds PreGame and Bouncer, so weigh this section as vendor description, not a recommendation. Everything above this point β the extension, `jest-axe`, Playwright, a CI gate β is free, open-source, and produces a list: a rule ID, an impact level, a DOM node. Someone still has to translate `color-contrast` on `.size-chart-link` into a changed hex value. PreGame runs at the same write-time stage as a linter, scoped to theme and template source β see accessibility linters for how that layer differs from a scanner β and instead of only flagging the line, suggests the fix inline. Bouncer occupies the CI-gate slot above and attaches the same fix-suggestion step: 35 million+ issues remediated as of 2026 on a 14-day cycle, customers typically spending 15β30 minutes a month reviewing the resulting pull requests β an audit-to-PR workflow, not an audit-to-spreadsheet one.
Frequently Asked Questions
Is axe-core the same thing as axe DevTools? No. axe-core is the free, MPL-licensed rule engine; axe DevTools is Deque's product line built on top of it β a free extension plus paid Pro, Auditor, and Monitor tiers. Lighthouse and most competing scanners run the same free engine underneath their own interface.
Does a zero-violation axe scan mean a page is WCAG compliant? No. It means the automatable slice of WCAG passed β roughly 60β70% of real issue volume, per TestParty's remediation data. Conformance is judged criterion by criterion, including ones no rules engine evaluates, like whether alt text is accurate or focus order matches the reading order.
Should I use jest-axe, Playwright with axe-core, or both? Both, at different layers of the same test suite. `jest-axe` catches a regression in an isolated component before it's assembled into anything; `@axe-core/playwright` catches what only exists once real components meet real data and layout β a modal that traps focus, a landmark that never mounted.
How should I handle violations from a third-party script I don't control? Exclude that specific container β a chat widget's iframe, a payment embed β and document why, with a ticket and a review date. Never disable a rule sitewide to silence it; that mutes real findings on your own templates along with the noise.
Should new pull requests be held to zero violations or zero new violations? Zero violations for genuinely new components. Zero new violations, diffed against a stored baseline, for a page getting tested for the first time β a strict zero bar against inherited debt on day one gets the check disabled within a sprint.
Do I need axe DevTools Pro if axe-core already runs in my CI? Not for detection. Pro layers AI-assisted guided tests, a dashboard, and Jira integration on the identical engine your CI already runs β useful if a team wants that workflow on top, not a requirement for catching more violations than the free engine already finds.
Humans + AI = this article. TestParty uses a cyborg approach to content β combining human accessibility expertise with AI capabilities to produce accurate, comprehensive guides. This content is for educational purposes and reflects our analysis of publicly available information as of the publication date. TestParty competes in the digital accessibility market, and we encourage readers to evaluate all solutions independently based on their specific needs.
Stay informed
Accessibility insights delivered
straight to your inbox.


Automate the software work for accessibility compliance, end-to-end.
Empowering businesses with seamless digital accessibility solutionsβsimple, inclusive, effective.
Book a Demo