---
title: Automated Accessibility Testing with TestingBot
description: Start testing for accessibility issues with TestingBot and Axe.
source_url:
  html: https://testingbot.com/blog/automated-accessibility-testing
  md: https://testingbot.com/blog/automated-accessibility-testing.md
---

# Accessibility Testing

Start testing for accessibility issues with TestingBot and Axe.

By [Jochen D.](https://testingbot.com/about/jochen-d)2021-04-30

 Share on Facebook 

 Share on Twitter 

 Post on Reddit 

 Share link 

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](https://www.w3.org/WAI/standards-guidelines/wcag/)), as well as [section 508 guidelines](https://www.section508.gov/).

## 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:

```javascript
const webdriver = require('selenium-webdriver');
const fs = require('fs')

const testingbotKey = "[your-testingbot-key]";
const testingbotSecret = "[your-testingbot-secret]";

const capabilities = {
    'browserName': 'firefox',
    'platform': 'WIN10',
    'version': 'latest',
    'client_key': testingbotKey,
    'client_secret': testingbotSecret,
    'name': 'Accessibility Test'
};

async function runAccessibilityTest () {
  let driver = new webdriver.Builder()
    .usingServer('https://' + testingbotKey + ':' + testingbotSecret + '@hub.testingbot.com/wd/hub')
    .withCapabilities(capabilities)
    .build();
  await driver.get("https://testingbot.com");
  const data = await fs.readFileSync('path/to/axe.min.js', 'utf8')
  await driver.executeScript(data.toString());
  let result = await driver.executeScript('let result; await axe.run().then((r)=> {result=r}); return result;');
  await fs.writeFileSync('path/to/report.json', JSON.stringify(result));
  await driver.quit();
}
runAccessibilityTest();
```

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:

- `violations` includes the rules that were violated and need to be fixed. 
- `passes` the rules that have passed successfully. 
- `incomplete` incomplete results, either due to an error or aborted test 
- `inapplicable` no matching content was found for these rules. 

For more information about accessibility testing, including more examples, please see our [Accessibility Testing Documentation](https://testingbot.com/support/accessibility).

[← Previous post Puppeteer Testing in the Cloud](https://testingbot.com/blog/puppeteer-cloud-testing) [Next post → Selenium 4: what's new](https://testingbot.com/blog/selenium-4)

## Sidebar

### TestingBot Cloud Testing

Run automated, manual and visual tests on remote browsers and devices. Sign up for a free trial.

[Free Trial](https://testingbot.com/users/sign_up)

### Latest articles

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights)

#### Announcing AI Test Insights

Use AI Insights to quickly discover why an automated test...

[Read: Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright)

#### Selenium vs Playwright 2026

Comparing Selenium vs Playwright - which is the best test...

[Read: Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing)

#### Maestro Physical Device Testing

Maestro testing in parallel on physical Android and iOS d...

[Read: Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

## Related Articles

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright "Selenium vs Playwright 2026")

### [Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

Comparing Selenium vs Playwright - which is the best test framework for your usecase?

[Read article →](https://testingbot.com/blog/selenium-vs-playwright)

[![Selenium 20th birthday](https://testingbot.com/assets/blog/2024/selenium20.webp)](https://testingbot.com/blog/selenium-20-years "Selenium 20th birthday")

### [Selenium 20th birthday](https://testingbot.com/blog/selenium-20-years)

Celebrate Selenium's 20th birthday. An overview of the years.

[Read article →](https://testingbot.com/blog/selenium-20-years)

[![Playwright Testing on TestingBot](https://testingbot.com/assets/blog/2023/playwright-testing.jpg)](https://testingbot.com/blog/playwright-testing-introduction "Playwright Testing on TestingBot")

### [Playwright Testing on TestingBot](https://testingbot.com/blog/playwright-testing-introduction)

Learn how Playwright can run your automated tests on a variety of browsers, local or remote browsers on TestingBot.

[Read article →](https://testingbot.com/blog/playwright-testing-introduction)

[![Selenium WebDriver BiDi](https://testingbot.com/assets/blog/2024/bidi.webp)](https://testingbot.com/blog/webdriver-bidi "Selenium WebDriver BiDi")

### [Selenium WebDriver BiDi](https://testingbot.com/blog/webdriver-bidi)

WebDriver BiDi support is now available on TestingBot. Learn how to use this exciting new improvement with your Selenium tests.

[Read article →](https://testingbot.com/blog/webdriver-bidi)

## More by Jochen D.

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights "Announcing AI Test Insights")
### [Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

Use AI Insights to quickly discover why an automated test failed.

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing "Maestro Physical Device Testing")
### [Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

Maestro testing in parallel on physical Android and iOS devices.

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing "tvOS Physical Device Testing")
### [tvOS Physical Device Testing](https://testingbot.com/blog/tvos-automated-testing)

Run automated tvOS tests on physical AppleTV devices.

[See all posts by Jochen D. →](https://testingbot.com/about/jochen-d)

## Ready to start testing?
[Start a free trial](https://testingbot.com/users/sign_up)
