Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
Accessibility Testing – Javascript Library Roundup

If you’re a developer looking to build accessibility assertions into your own testing tool, there are a few things you’ll want to look for:

  1. A javascript library – high fidelity accessibility testing need to happen after the DOM has rendered.
  2. A standalone library that you can run in development and CI.
  3. Open source, for its transparency and flexibility

Here I’ve listed three libraries that meet the above criteria, along with some of the finer points about the tools, including license, standards covered, unit test coverage, and documentation detail.


HTML CodeSniffer

HTML CodeSniffer is an open source, “BSD-style license” javascript accessibility auditing library. It has rules for all levels of WCAG 2.0 as well as Section 508 guidelines. It also has a basic PhantomJS command line runner bundled in the project. The library does not have any unit tests for the assertions it defines.

HTML CodeSniffer is used to power the bookmarklet by the same name, as well as Pa11y, a hosted testing tool.

Strengths

  • Tests map discretely to standardized guidelines

  • Test result objects have clear descriptions

Weaknesses

  • No unit or behavioral tests

  • Sparse documentation

Accessibility Developer Tools

Google’s Accessibility Developer Tools is a javascript library released under the Apache 2.0 license. It defines rules based on WCAG 2.0 and general best practices. The rules have comprehensive unit and behavioral tests. While the audit results have links to a detailed description with associated standards, the standard is not included explicitly.

Accessibility Developer Tools is available bundled as a Chrome Extension.

Strengths

  • Robust consideration of WAI-ARIA techniques

  • Good unit test coverage

Drawbacks

  • Finding associated WCAG standards is an extra step away

Quail

Quail is MIT licensed, with a set of assertions that are well tested and have a clear mapping to WCAG 1.0 and 2.0 standards as well as Section 508 rules. It is a comprehensive and well documented library. Its biggest drawback is that it does not have a browser based extension or plugin, and that makes it harder to evaluate out of the box.

Strengths

  • Flexible license

  • Good documentation

  • Thoroughly tested

Drawbacks

  • No associated plugin or extension


Whatever you decide on, keep in mind that automated accessibility testing is never a complete picture of accessibility. Make sure to smoke test with screen readers and keyboard navigation, and present the app to folks with disabilities and see what works (and what doesn’t).

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *