axe-core, maintained by Deque Systems, checks websites and other HTML interfaces for accessibility problems. Its JavaScript engine runs inside the page under test and returns structured results.

  • Add axe-core as a development dependency, load its script into the test page, then call axe.run() after rendering each interface state.
  • Inspect results.violations in your test assertions and send incomplete findings for human review.
  • Rules cover Web Content Accessibility Guidelines (WCAG) requirements and accessibility best practices. Checks run locally without a third-party server.
  • Use a real browser for layout-dependent checks: the README says color-contrast testing does not work in JSDOM, a simulated browser environment.
  • The engine uses the Mozilla Public License 2.0; bundled dependencies have separate license notices.

For a small web project, this adds repeatable accessibility checks alongside functional tests. Open menus and dialogs before scanning them; the engine only checks rendered content.

Caveat: A clean scan covers only automatable checks; human accessibility review is still necessary.

Discovered via this r/BestGitHubRepos thread.