This project is an automated testing project that utilizes WebdriverIO (WDIO) and Axe to test the accessibility of a web page. The purpose of this framework is to analyze the accessibility of a web page and output the results to an HTML report.
- accessibility-results.html
- accessibility.test.js: This file contains the test code that analyzes the accessibility of a web page using Axe.
To get started with this project, follow the steps below:
- Clone the repository to your local machine
- Install the dependencies by running
npm install
- Run the test suite by running
npm run wdio
- After running the test, you will be able to find the accessibility results for each page of the sitemap in an HTML report located within the /output directory.
This project uses Axe to generate an accessibility report that provides information about the accessibility of the web page. After running the tests, the report can be found in the /artifacts directory in HTML format.
Note: The AxeBuilder object in the accessibility.test.js
file can be configured to include or exclude specific accessibility tests by using the .withTags()
method.
Axe uses tags to categorize accessibility rules based on their severity and relevance. Some of the available tags are:
- wcag2a: WCAG 2.0 Level A
- wcag2aa: WCAG 2.0 Level AA
- wcag2aaa: WCAG 2.0 Level AAA
- wcag21a: WCAG 2.1 Level A
- wcag21aa: WCAG 2.1 Level AA
- wcag22aa: WCAG 2.2 Level AA
- best-practice: Common accessibility best practices
You can find more tags on the Axe API documentation.