Skip to Main Content

The Case for Accessible Unit Testing

taught by: Zoltan Hawryluk

Session Summary

Even though the website you are working on is accessible now, it may not be accessible in the future if inexperienced developer accidentally deletes the code that makes it that way. This session will show how to prevent this with unit testing.


Your team spent a lot of time making the website you are working on accessible. Many hours of coding and testing has been involved. Then an inexperienced developer joins your project and accidentally removes some of the accessibility features of your website. All that work down the drain!

This is a common scenario that a lot of web development teams find themselves dealing with all the time. Fortunately, it can be avoided by incorporating unit testing in your workflow. In this session, developers will learn how to use unit testing to mimic all the manual tests that have been done to test the website (including keyboard and screen reader testing) as well as how to ensure these tests are run every time a component is changed, so what is made accessible, stays accessible.

Practical Skills

  • What Unit Testing is and why it is important.
  • How to create unit tests to test the accessibility of a web component using Jest and Puppeteer (while discussing other unit testing packages you can use as well).
  • A walkthrough a several examples of unit tests and a discussion on how to use unit testing in your developer workflow to prevent inaccessible code from being checked into your codebase by accident.