Test the accessibility of your website: automatic testing

Five toy robots in a row

This is part 4 of our blog series about testing the accessibility of your website. Also read the other parts:

Color and contrast
Enlarge font
Keyboard navigation
Screen readers

Do you want to get started with the accessibility of your website? Then it helps to test how your website is now. You learn a lot from this, so that you can then take more targeted measures. This is part 4 of our blog series about testing the accessibility of your website.

Testing your website against international accessibility standards (WCAG 2.1) can be done in two ways:

In this article, we dive deeper into automatic tests. How do you do this and what are the advantages and disadvantages?

How do automated accessibility tests work?

Automated accessibility tests run a set of scripts that compare the content of your web pages with certain criteria. Those criteria are based on WCAG 2.1. For example, according to WCAG 2.1, each image must include a description for visually challenged users.

For about 15-25% of the accessibility requirements, it can be automatically checked on compliancy. There are several accessibility testing tools on the market that can do this. The W3C maintains a list of international test instruments. There are also service providers that take care of automatic accessibility testing for you.

Different types of accessibility testing tools

There are different types of accessibility testing tools:

Browser extensions

Browser extensions are usually free to use and generally don’t require any technical expertise. This test is therefore the easiest to perform. Usually navigate to the page you want to test and click a button. A test report is then generated. Accessibility issues are highlighted and described here. You will also receive tips on how to solve the problems. A disadvantage is that with an extension you can only test individual pages. So if you have a lot of pages this is a very enduring process.

Examples of browser extensions for Firefox:

Examples of browser extensions for Chrome:

Example of browser extensions for Edge

Command line tools

Command line tools are a bit more technical and are often used by developers. These tools provide the ability to test multiple URLs or an entire domain at once. You can also use it to check web pages that are still running locally (and therefore cannot yet be tested via the browser).

Examples of such tools are aXe-cli and Pa11y.

APIs

If you want to take automated testing to an even higher level, you can use APIs that can be integrated into the development environment. You will then be notified if an accessibility error is discovered in the code. This way you continuously monitor the accessibility of your website, instead of performing a one-off test.

Advantages of automatic testing

Automatic testing is a nice addition to your manual audit. The main advantages at a glance:

Of these benefits, speed is probably the most important. With a few small actions you have an overview of problems that need to be solved.

Disadvantages of automatic testing

We already said it: automatic testing is an addition to your manual audit. It is not a substitute! Automatic testing has a number of important disadvantages and shortcomings:

Why can’t everything be tested automatically?

Many guidelines cannot be tested using a script because they require human judgment. An automated accessibility testing tool can check whether an image has a description. However, the testing tool cannot judge whether the description is correct. A photo of a cow with the description “dog” will not reject an automated testing tool. This also applies to links. It will always be necessary to manually check whether the description of the link is correct with the purpose of the link.

With the results of an automatic test, you cannot therefore substantiate that a website meets all accessibility requirements. This also requires a manual examination. An automatic test is therefore not sufficient for issuing an accessibility statement.

Conclusion

Automatic tests have added value. You can quickly check a large number of pages for a number of obvious problems. However, they cannot replace a manual audit.

Want to know more about testing the accessibility of your website? In part 5 of this blog series we will discuss the use of a screen reader.