Browser JavaScript

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

Overview of Axe DevTools for Web with browser JavaScript

Not for use with personal data

The @axe-devtools/browser package is a JavaScript library you load into the page your tests exercise. You initialize it once, then call run() on a DOM element to scan it for accessibility violations and get the results back as a JSON object. Because the scan takes an element rather than a browser session, it works with test suites that render markup themselves, such as Jasmine, Karma, or a testing library running under Jest.

If your tests navigate a browser through a driver instead, use the binding for your framework: Cypress, Playwright, Puppeteer, WebdriverIO, or WebDriverJS.

Getting started

  • Installation options: configure your artifact repository, download a bundle, or install directly from Deque's Agora
  • Import and initialize: import the package and set up your test environment
  • Write tests: add accessibility scans to your existing tests
  • API reference: every function the library exposes, including AxeDevTools.init, AxeDevTools.configure, and AxeDevTools.run