Skip to content
On this page
[Test types]

Accessibility testing

Run the Accessibility test agent and it checks the live page with axe, then reports each violation with the rule that caught it. Or, in Test Lab's editor, choose 508 compliance and xtest reads the page and writes a test case for each thing a screen-reader or keyboard user would trip over, without running anything. Each case names the WCAG criterion behind it.

The Accessibility test agent runs the WCAG 2.0, 2.1 and 2.2 level A and AA rules with axe-core 4.10.3. On the Cloud browser it also catches a control whose spoken name says something other than its visible words (WCAG 2.5.3, label in name), and something clickable a keyboard cannot reach. WCAG 2.2 AA covers WCAG 2.0 AA, the level the Revised Section 508 Standards point to; passing these rules is not a Section 508 certification.

What it looks for

Unlabelled inputs

A form control with no label, aria-label or aria-labelledby. Screen readers announce nothing useful for it. WCAG 1.3.1 and 4.1.2.

Images with no alt

An image that carries meaning and no alt attribute, so it is invisible to assistive technology. WCAG 1.1.1.

Heading level skips

A jump from h2 straight to h4, which breaks outline navigation. WCAG 1.3.1.

No main landmark

Nothing marked <main> or role="main", so there is no way to skip the header. WCAG 2.4.1.

Positive tabindex

Elements with tabindex greater than zero, where tab order stops matching the visual order. WCAG 2.4.3.

Each one comes back as a case you can keep, edit or delete:

text
Test case  ·  accessibility  ·  high
Title      Label the email input "contact_email"
Scenario   The email input named "contact_email" has no <label>, aria-label or
           aria-labelledby, so screen readers announce nothing useful for it.
Steps      1. Locate the email input "contact_email"
           2. Inspect it with a screen reader or the accessibility tree
           3. Confirm no accessible name is exposed
Expect     Every form control exposes an accessible name (WCAG 1.3.1 / 4.1.2).

These five checks come from the page itself, so they still work without the AI. The AI adds cases for the things structure alone cannot see, such as whether a label actually describes its field.

What it will not tell you

xtest does not drive a real screen reader and does not simulate colour blindness. Automated checks catch the mechanical failures; whether a page is usable is still something a person has to try, ideally one who uses assistive technology every day.

Conformance levels

[Level A]

The floor. Missing it locks people out entirely.

[Level AA]

What most organisations are asked to meet, and what Section 508 points at.

[Level AAA]

Rarely realistic for a whole site; worth aiming at page by page.

Fixing the three most common findings

1. Alt text

html
<!-- Bad -->
<img src="product.jpg">

<!-- Good -->
<img src="product.jpg" alt="Blue wireless headphones with noise cancellation">

<!-- Decorative images -->
<img src="decoration.svg" alt="" role="presentation">

2. Form labels

html
<!-- Bad -->
<input type="email" placeholder="Email">

<!-- Good -->
<label for="email">Email address</label>
<input type="email" id="email" placeholder="Enter your email">

<!-- Or, where no visible label fits -->
<input type="search" aria-label="Search products">

3. Colour contrast

css
/* Bad: 2.8:1 */
.text {
  color: #999999;
  background-color: #ffffff;
}

/* WCAG AA and AAA, 7:1 */
.text {
  color: #595959;
  background-color: #ffffff;
}

/* WCAG AAA, 12.6:1 */
.text {
  color: #333333;
  background-color: #ffffff;
}

The criteria behind these are in the WCAG 2.2 quick reference.

[Academy courses]