2

I am working on implementing accessibility (for visually impaired individuals) for one of our web application. It need to be ARIA compliant. Right now we are testing our changes with screen reader manually. For example we have Tree control in our application. I open NVDA screen reader and then navigate through my Tree Nodes. NVDA screen reader speaks out

  • Node XYZ expanded, (When I expand XYZ node with right arrow key)

  • Node XYZ collapsed, (When I collapse XYZ node with left arrow key)

Along with the voice it also write down this text.

But all this is manual. Now we want to setup automated test cases for the same so that any regression bugs can be caught by are test cases. Do there exist any such tool which we can use to automate our test cases. Any direction will be helpful.

PS: Just for a sake of comparison. We have nunit to write test cases for c# application. After writing test cases we integrate them into our build process. Any breaking change is caught when we run the build. I am looking for something similar to test out our aria compliance and screen reader's behavior with our web application.

Vineet Kumar
  • 176
  • 2
  • 11
  • I'm not aware of any automated/headless tool that lets you use NVDA for this. I'm not sure TPG's JAWS Inspect can run like that either. Would be nice to have though! – Mike Dearman Apr 13 '18 at 05:24

3 Answers3

4

I don't know of any existing tools for testing screen readers, however, there are accessibility APIs that test websites and web applications.

axe-core from Deque Systems is widely used and well-supported.

I wrote a python package to run automated web accessibility tests that uses axe-core and selenium.

While it isn't quite what you are looking for, it does cover about 60% of accessibility guidelines, including aria roles and attributes. It should help with determining screen reader usability.

You could integrate axe into C#, similar to my python package and the Java package, also created by Deque.

I hope this helps!

3

Appreciate this is quite an old question, but having explored this area a lot recently thought was worth updating with the state as of 2023 as there is now some progress in this space.

Current tooling available at time of writing (that I’m aware of, may not be exhaustive):

  • guidepup - NodeJS automation for VoiceOver and NVDA supporting all keyboard commands and getters for spoken phrases (disclaimer: I’m the author).
  • auto-vo - CLI for navigating sequentially through a page with VoiceOver and reporting the spoken phrases, also exports a separate Node module for some interactions with VoiceOver.
  • screen-reader-reader - NodeJS automation for VoiceOver and NVDA for starting, stopping, and getting spoken phrases.
  • web-test-runner-voiceover - NodeJS plugins for @web/test-runner to automate VoiceOver testing.
  • nvda-testing-driver - .NET automation for NVDA supporting all keyboard commands and getters for spoken phrases.
  • assistive-webdriver - NodeJS implementation of a Webdriver server that allows remote testing of screen readers (e.g. NVDA, JAWS) running in a VM.

As stated in other answers, there are also a number of static analysis tools such as axe, as well numerous browser extensions offering similar static analysis, and companies such as Assistiv Labs offering remote environment services to interact with screen readers manually (similar to SauceLabs/BrowserStack/etc. but for screen readers, magnification etc. - no affiliation and haven’t used services so can’t vouch, simply an observation).

Worth calling out that none of these cover the full range of a11y requirements - there is more to a11y than just screen readers. A combined/layer approach including automation, manual testing, and user testing likely preferred.

C..
  • 802
  • 4
  • 16
1

It sounds like you're already performing some pretty good manual accessibility testing against your web application, which no automated testing tool is going to be able to replicate completely. That said, if you're looking to take care of any low-hanging fruit with an automated solution, like Kimberly suggested, there are several automated accessibility testing tools out there that you can relatively easily integrate into your existing web application's testing framework that might help you.

One such tool is Continuum, which doesn't have a C#-based library offering at the moment, but could be used in a separate testing framework to be run against your web application after it has already been built. This may be preferable depending on your use case, as code linters for accessibility aren't perfect and are highly language-dependent, whereas testing the HTML of your web application more closely matches the screen reader use case you say you're trying to test for. You could even integrate Continuum into your existing CI/CD process to make sure your application is tested during development as opposed to afterwards, to reduce your manual accessibility testing load.

Continuum has a few sample projects to get you started, depending on your technologies of choice. Free versions are available at webaccessibility.com if you're interested. Most of them are Java- or JavaScript-based at the moment.

James Pizzurro
  • 365
  • 1
  • 3
  • 10