docbrown/docs/tests/accessibility-tests.md
Jacob Herrington c6c5421163 Javascript automated testing and a11y doc (#4873)
* Add jext-axe package and introduce a11y testing

Automated a11y testing is NOT comprehensive. We cannot expect this to
even scratch the surface of potential a11y issues.

However, we can expect to find a percentage of issues that are currently
flying under the radar. Adopting some automation around a11y testing
also allows us to use CI to find a11y regressions -- which should be
really handy.

I've never really used Jest before, and Preact seems to make it a little
more complicated, but as far as I can tell, this is a decent way to add
at least some minor automated a11y testing.

* Add doc about automated a11y tests
2019-11-22 08:32:01 -05:00

1.4 KiB

title
Accessibility Tests

Accessibility Tests

Accessibility testing is a form of automated and manual testing that helps us identify some of the potential accessibility concerns on DEV.

Many a11y issues are not obvious to everyone who contributes to the DEV project, therefore leaning on tools to help us identify these issues is a good practice.

It's a good idea to use browser plugins while you're developing to keep an eye out for these issues, as well as including automated tests to catch regressions in future changes.

The aXe devtools extension is a great place to get started. It works in both Firefox and Chrome. Use an extension like this one to find potential a11y issues in your workflow.

Automated testing in Preact

An overarching a11y testing strategy isn't currently in place for the DEV application, but there are some automated tools you can take advantage of in this project.

It is important to note that automated accessibility testing is only effective at finding ~30% of accessibility issues. It's important to do manual a11y testing as well.

When you're writing Preact components, you can include some basic a11y testing in your unit tests with jest-axe.

If you're still curious there are some great talks on accessibility for developers.