TestingBot Blog

TestingBot provides a cloud of browsers and devices, ready to run your Automated, Live and Visual tests.

< Back to Blog Overview

Accessibility Testing

2021-04-30

Automated Accessibility Testing allows you to test if your website is accessible to all types of users.


The popular accessibility testing framework Axe allows for testing your website for all kinds of accessibility issues. The framework includes checking if your website adheres to the Web Content Accessibility Guidelines (WCAG), as well as section 508 guidelines.

Why should I consider accessibility Testing?

Testing for accessibility issues allows you to make sure that your website is working well for all types of users. Some of your visitors might have issues with color contrasts, or use a screen-reader to digest your website.


If some of your DOM elements lack sufficient color contrast, these users might have a hard time reading your website.
People using screen readers might have trouble reading parts of your website, as some DOM elements might have similar titles, alt tags or aria-labels.
Alternative texts on your webpage, repeating the same content over and over, might confuse your visitors with screen readers.


By integrating accessibility testing in your test process, you'll ensure that your customers can use your product in the best way possible.


The principles of Accessibility Testing

The WCAG stipulates four main principles, stating that content on webpages should be POUR: Perceivable, Operable, Understandable and Robust.


Perceivable

The contents on your webpage must be presented to your users in a way that they can perceive, it must be visible to their senses.


This means you should provide text alternatives, adaptable content (content that can be presented in different ways) and make content distinguishable (foreground/background colors, audio, ...).


Operable

The UI of your webpage should not require interaction that a user cannot perform. Make sure your elements can be used with keyboard only, make your webpages navigable and provide enough time to your users to digest your content.


Understandable

Make the content on your webpages easy to understand. Ensure your UI operates in a predictable way.


Robust

Maximize compatibility of your webpage with current and future browsers, screen readers and other user agents, including assistive technologies.


Start using Accessibility Testing

The Axe framework comes as a javascript file, which can be injected in the page that you are testing. Axe will then report the results back to your test case, allowing you to verify if any issues are present on your page.


See a simple example below:



This NodeJS example will inject the path/to/axe.min.js file in the current webpage and report the results back to path/to/report.json for verification.


The results will contain the following structure:


For more information about accessibility testing, including more examples, please see our Accessibility Testing Documentation.

< Back to Blog Overview

Sign up for a Free Trial

Start testing your apps with TestingBot.

No credit card required.