The A11y Machine or a11ym (pronounced as ‘alym’) is an open-source automated accessibility tool for web applications which crawls and tests web pages against accessibility conformance standards to provide detailed reports.
A11ym validates the web pages against following accessibility standards:
Accessibility is not just about helping disabled people. It’s about making the web more inclusive and enabling people around the globe with different abilities to access web content with greater ease. Accessible websites not only yield good SEO reports but also avoid potential lawsuits. Hence, making websites accessible is beneficial in every way.
One of our clients, a renowned insurance company in Australia, wanted to perform accessibility checks on their current site. Imagine the amount of manual effort in terms of time, resources, and money required to perform the accessibility run for a complete website! To overcome this challenge we decided to look for an appropriate automated tool, which brought us to a11ym.
It had a couple of compelling features which sealed the deal for us -
Pre-requisite:
To ensure successful installation of a11ym, open terminal and run command: $a11ym
You will see options list for a11ym
Let’s start with typing the base URLs of website
Hit command : $ ./a11ym http:/test.org/
All URLs accessible from http://test.org/ will be tested against the WCAG2AA (default accessibility standard defined in a11ym) standard. In order to reduce the number of URLs to test, --maximum-URLs option will be used.
For example: if the only URL needs to be tested use --maximum-URLs 1 or -m 1
What if the client wants to perform accessibility check on business critical pages instead of crawling complete website? In order to achieve the same, multiple URLs can be provided in two ways -
URLs.lists is the file containing a list of web pages. It can be of other extensions e.g. URLs.txt. When reading several URLs, the --maximum-depth option will be forced to 1 be the default.
Note the -: It means “Read URLs from STDIN please”.
Standards (WCAG2A, WCAG2AA, WCAG2AAA) cannot be combined with each other, except HTML5 that can be combined with any other.
So for instance, to run WCAG2AAA:
$ ./a11ym --standards WCAG2AAA http://test.org/
To run WCAG2AA along with HTML:
$ ./a11ym --standards WCAG2AA,HTML http://test.org/
Following are the intricacies of a11ym
“a11y_output” folder will be formed in the same directory from where the run was executed, once the test run is complete.
To view complete report open a11ym_output/index.html residing in same folder.
Report of all URLs will look like this:
A11ym report bifurcates all the issues in three categories i.e. error, warning, and notice.
A CSS selector is provided with each reported issue to select and analyse the buggy element. In addition to it, description and a link to the W3C recommendation is also provided.
For example:
You can follow the GitHub link to download the a11ym project and explore it further.
If you work with QA and test automation, you can also explore our posts on Behat installation and mobile testing automation tools.