Accessibility Testing with Pa11y

Accessibility testing is a type of usability testing that evaluates how well a website or app can be used by people with disabilities. is the practice of making your web and mobile apps usable to as many people as possible. It makes apps accessible to those with disabilities, such as vision impairment, hearing disabilities, and other physical or cognitive conditions.

PA11Y is an automated testing tool which you can run from the command line or as part of your test suite. Pa11y is a free and open source software that tests websites for accessibility issues. Pa11y-ci is the command line utility geared towards continuous integration (CI). Pa11y uses WCAG 2.1 rules.

Features:

  1. PA11Y uses Puppeteer to run its own headless Chrome browser. It uses HTML Code Sniffer as its default runner, but it can also run axe-core at the same time if you tell it to.
  2. GitLab integrates Pa11y into a CI/CD job template. The a11y job analyzes a defined set of web pages and reports accessibility violations, warnings, and notices in a file named accessibility.
  3. Useful for when you want to run a one-off test against a web page ~ https://github.com/pa11y/pa11y.
  4. Much like other test runners, Pa11y executes a set of test cases (based on Accessibility standards like WCAG 2.0 AA) against a set of pages on an application. It scans the markup of that page and reports if the markup passes the test cases or not.

Some useful links:

Tool:
https://pa11y.org

How to use it ?
https://www.youtube.com/watch?v=T7ImiBWD4gY

Access via GitHub:
https://github.com/pa11y/pa11y

Run it on CMS tool:
https://mikemadison.net/blog/2020/11/19/introduction-to-accessibility-testing-pa11y

Configure accessibility testing:
https://docs.gitlab.com/ee/ci/testing/accessibility_testing.html

Automated accessibility testing for website using GitLab with Pa11y and Cypress:
https://docs.gitlab.com/ee/ci/testing/accessibility_testing.html