Run pa11y to each page on your sitemaps.
TBA
TBA
- Clone the repository to your chosen location (choose wisely, this will be the folder you will be running
wp-pa11yfrom) - Run
npm installinside the folder - Set up your sitemaps (see section "Configuration")
- Run the app (see section "Running the app")
wp-pa11y reads sitemaps from wp-pa11y key in the project package.json file (examples below).
Add wp-pa11y array to your project root package.json and add sitemaps as objects.
{
"name": "your-project",
"version": "x.y.z",
"dependencies": {},
"devDependencies": {},
"wp-pa11y": [
{
"url": "https://example.com/sitemap.xml",
"config": {
"hideElements": "#CybotCookiebotDialog"
}
},
{
"url": "https://subdomain.example.com/sitemap.xml",
"config": {
"hideElements": "#CybotCookiebotDialog",
"ignore": [
"WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.A.NoContent"
]
}
}
]
}Depending on installation method, the command might be node wp-pa11y.js or node node_modules/.bin/wp-pa11y.
Running without any options' app checks sitemaps and outputs reports to the CLI.
To see all available options and arguments run wp-pa11y --help.
| command | Description |
|---|---|
make html |
Generates HTML reports to ./wp-pa11y/{domain}/ folder. |
make cli |
Outputs reports to cli. |
See up-to-date list of project contributors.
MIT License