a11ytester-action
Runs Webhint and pa11y (accessibility testing tools) on one or more provided URLs. Results will be output into the logs of the action.
This action is entirely dependent on tools running as intended in GitHub Actions (i.e. a CI platform), which is somewhat flaky, unfortunately.
This action will currently not break when accessibility problems occur. The good side of this is that many typical sites will exhibit a fairly high ratio of "false positives" and similar.
Lastly, note that this action is a subset of the "full" a11ytester project, since GitHub Actions seems incapable of running Lighthouse.
urls
One or more escaped URLs in the format (single) '[\"www.google.com\"]'
or (multiple) '[\"www.google.com\",\"www.reddit.com\"]'
.
on: [push]
jobs:
accessibility:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: a11ytester
uses: mikaelvesavuori/a11ytester-action@v1
with:
urls: '[\"www.google.com\"]'
Example configurations for the tools are below. These files should reside in the repository utilizing the action.
.hintrc
{
"extends": ["accessibility", "web-recommended"],
"formatters": ["json"],
"connector": {
"name": "puppeteer",
"options": {
"headless": true
}
}
}
{
"defaults": {
"concurrency": 4,
"standard": "WCAG2AA",
"runners": ["axe"]
}
}