https://github.com/rafalsep/testcafe-accessibility
https://github.com/rafalsep/testcafe-accessibility
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rafalsep/testcafe-accessibility
- Owner: rafalsep
- License: mit
- Created: 2022-10-24T16:14:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-24T19:39:47.000Z (almost 4 years ago)
- Last Synced: 2025-08-14T18:28:23.530Z (12 months ago)
- Language: JavaScript
- Size: 337 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Testcafe accessibility
###### Small lib that can be used to run accessibility for testcafe using axe and generate html report with screenshot
[](https://travis-ci.org/rafalsep/testcafe-accessibility)
## Features
- uses axe as underlying accessibility engine
- can be used to generate report for each url separately due to ${MODULE} in the test name
- will automatically take a screenshot after running the accessibility test and link it to the accessibility test
- supports quarantine mode and parallel test execution
## Install
```
npm install testcafe-accessibility
```
## Configuration
Once installed add `accessibility` configuration in `.testcaferc.js` file
```js
module.exports = {
// some other config
accessibility: {
path: 'tmp',
pathPattern: '${DATE}/${FIXTURE}/accessibility/[${TEST}]_[${MODULE}]_${TIME}_${QUARANTINE_ATTEMPT}.html',
},
};
```
| Required | Argument | Description | Example |
| -------- |---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -------------------- |
| Yes | accessibility.path | The base directory where accessibility reports will be saved | tmp |
| Yes | accessibility.pathPattern | A pattern that defines how TestCafe composes the relative path to a accessibility file. See [Screenshot and Video Directories](https://testcafe.io/documentation/402840/guides/advanced-guides/screenshots-and-videos#screenshot-and-video-directories). | ${DATE}/${TEST}.json |
## Examples
See working examples in examples folder
## Author
Rafal Szczepankiewicz