Introduced in GitLab 12.8.
If your application offers a web interface and you are using GitLab CI/CD, you can quickly determine the accessibility impact of pending code changes.
GitLab uses pa11y, a free and open source tool for
measuring the accessibility of web sites, and has built a simple
CI job template.
This job outputs accessibility violations, warnings, and notices for each page
analyzed to a file called
Add the following to your
stages: - accessibility variables: a11y_urls: "https://about.gitlab.com https://gitlab.com/users/sign_in" include: - template: "Verify/Accessibility.gitlab-ci.yml"
a11y job in your CI/CD pipeline, runs
Pa11y against the webpages defined in
a11y_urls, and builds an HTML report for each.
The report for each URL is saved as an artifact that can be viewed directly in your browser.
accessibility.json artifact is created and saved along with the individual HTML reports.
It includes report data for all URLs scanned.
include:remoteand use a link to the current template in
It is not yet possible to pass configurations into Pa11y via CI configuration. To change anything, copy the template to your CI file and make the desired edits.