CheckOps home

Tools directory

J

CheckOps

jest-axe

jest-axe is an MIT-licensed custom Jest matcher that runs axe-core against rendered HTML or components and asserts toHaveNoViolations, with colour contrast checks disabled because JSDOM cannot compute them.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

jest-axe is a custom Jest matcher for axe-core, making it easy to add basic accessibility checks to component and unit tests. You render markup (directly or through a library such as React Testing Library), pass the container to axe(), and assert expect(results).toHaveNoViolations(). Failures list each violation with a description and a link to Deque’s guidance.

The README is explicit about limits: colour contrast checks do not work in JSDOM, so they are turned off in jest-axe, and automated checks cannot catch every accessibility problem. configureAxe lets you set default rules, disable specific checks or add custom rules and checks, and options can be passed per call. It requires jest-environment-jsdom (installed alongside Jest), and works with React, Vue, Angular and plain HTML. Version 11.0.0 was released on 26 July 2026. Because it runs at the component level, it is a fast first line of defence that complements browser-based tools such as cypress-axe, Pa11y or Accessibility Insights.

The source code is at NickColley/jest-axe on GitHub under the MIT licence, with about 1,100 stars; the most recent commit was on 2 November 2026.

Features

  1. Component-level checks: Fast accessibility assertions in unit tests.
  2. Jest matcher: toHaveNoViolations with clear failure output.
  3. Configurable: configureAxe for rules and custom checks.
  4. Framework-agnostic: React, Vue, Angular or plain HTML.

Pros

  1. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 2 November 2026.

Cons

  1. No contrast checks: JSDOM cannot compute colours.
  2. Partial coverage: Layout, focus and visual issues need browser testing.
npm install --save-dev jest jest-axe jest-environment-jsdom
/** @jest-environment jsdom */
import { render } from "@testing-library/react";
import { axe, toHaveNoViolations } from "jest-axe";
import { SignupForm } from "./SignupForm";

expect.extend(toHaveNoViolations);

test("signup form has no detectable violations", async () => {
  const { container } = render(<SignupForm />);
  expect(await axe(container)).toHaveNoViolations();
});

Resources:

Pricing

jest-axe is free and open source under the MIT licence.

  1. Front-end teams on Jest wanting accessibility checks in component tests.
  2. Design systems checking every component automatically.

Conclusion

jest-axe is a lightweight, effective way to catch common accessibility mistakes early in component tests.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with jest-axe side by side.