Overview of the Watcher package
The Watcher package is integrated into your test suite to test for accessibility errors
Watcher is the code component that you integrate into your test suite to add accessibility testing.
Documentation Overview for Watcher
The information in the Watcher section of the documentation consists of the following:
- This article, Overview, discusses the Watcher package (also referred to as axe Watcher). Here, you can find information about the package and links to other resources.
- System Requirements outlines the software versions required for use with Watcher.
- Articles under Instructions provide step-by-step instructions for integrating Watcher with the supported test frameworks, including example snippets for the supported languages. This is the same information you see when you create a project on the axe Developer Hub site.
- The documents under API References detail the APIs provided by the Watcher package for the supported languages.
What is Watcher?
The Watcher package lets you easily integrate accessibility testing into your existing test suite. These are the available packages:
- A Node.js package available on npmjs.com for JavaScript and TypeScript developers
- A Java package available on Maven Central.
The Watcher package, when integrated into your end-to-end test suite:
- Adds accessibility validation to your existing test suite with minimal code changes, thanks to Watcher wrapping your test framework's important methods and function calls.
- Automatically analyzes web pages when you run your test suite and re-analyzes the pages upon detection of any change to the DOM (each change is considered a separate page state)--perfect for single-page web apps and other complex sites with login pages and other dynamic content.
- Links Git commits to accessibility results to let you evaluate the accessibility of each commit and monitor your project's overall accessibility progress.
- Sends accessibility results tied to each page state and Git commit to axe Developer Hub, where the results are tracked, de-duplicated, and presented.
Installation
See the instructions for your testing framework for information on installing the Watcher package.
System Requirements
For the system requirements for Watcher, see System Requirements.
Even though the axe Developer Hub website has wide browser support, only Google Chrome is supported by the Watcher package for testing, so, for instance, you cannot use Cypress's default Electron browser to run your tests.
API Reference
For references to the APIs provided by the Watcher package, see the API reference.
Release notes
For information about the changes in the Watcher package, see the Watcher Release Notes.
The Examples Repo
You can experiment with the code in the examples repository on GitHub. It contains JavaScript and TypeScript examples for:
Instructions for Modifying Your Test Suite
The instructions section of the documentation includes instructions for modifying your test suite to include the Watcher package.
These are the same instructions you see when creating a new project on axe Developer Hub.
The following sections contain links to each testing framework's instructions: