accessibility
@ensono-stacks/playwright:accessibility
Adds axe accessibility tests to your test project
The accessibility generator installs @axe-core/playwright
and configures an example accessibility test
Usage
nx g @ensono-stacks/playwright:accessibility
Command line arguments
The following command line arguments are available:
Option | Description | Type |
---|---|---|
--project -p | The name of the test project to add accessibility tests to | string |
Generator Output
Scaffolding accessibility testing will add two dependencies to the package.json
:
@axe-core/playwright
- The accessibility test engineaxe-result-pretty-print
- Result formatter
Additionally, an example accessibility test will be generated, showcasing how to utilise both axe and axe-result-pretty-print to scan your application for accessibility violations:
Generated files
.
├── apps
│ ├── <app-name>-e2e
│ │ ├── src
│ │ │ ├── axe-accessibility.spec.ts #Example accessibility test using playwright
└──────────
note
Visit the Accessibility Testing
documentation for further details!