Accessibility Testing: WCAG Checklist, Automated Tools and Manual Checks
Accessibility testing checks that people using keyboards, screen readers, magnifiers or voice control can use your product. We built a deliberately broken checkout page and a fixed version, ran the axe-core engine on both, and then listed the problems the automated scan missed, from a clickable div to low-contrast text, along with a practical WCAG checklist for testers.
- Accessibility testing combines automated scans with manual checks against WCAG, usually level AA.
- axe-core 4.10.2 found 9 rule violations on our broken page, including missing alt text, an unlabelled select, an empty button and no page title.
- It did not report a clickable div that keyboard users cannot reach, a “click here” link or a data table without headers.
- Grey text #aaa on white measured 2.32:1 contrast, well below the 4.5:1 that WCAG AA requires for normal text.
About one in six people worldwide lives with a significant disability, according to the World Health Organization, and many more have temporary or situational limits: a broken arm, a bright screen outdoors, a noisy room. If a checkout cannot be completed with a keyboard, or a screen reader announces “button” with no name, those users leave. In many countries, inaccessible public and commercial websites also carry legal risk. Accessibility testing finds these barriers before users hit them.
We wrote two small HTML pages, ran the open-source axe-core 4.10.2 engine on them in Node.js with jsdom, and calculated contrast ratios with the WCAG formula in Python. The browser-based checks in the manual section are a checklist, not results from a single tool.
What is accessibility testing?
Accessibility testing verifies that a website or app can be perceived, operated and understood by people with visual, hearing, motor and cognitive disabilities, and that it works with assistive technologies. It is a form of non-functional testing closely related to usability testing, and like security testing it needs both tools and human judgement.
WCAG in one minute
The Web Content Accessibility Guidelines (WCAG), published by the W3C, are the standard almost every law and policy references. They are organised under four principles, often remembered as POUR:
- Perceivable: text alternatives, captions, sufficient contrast, content that adapts to zoom.
- Operable: everything works with a keyboard, users have enough time, nothing flashes dangerously, navigation is clear.
- Understandable: readable text, predictable behaviour, helpful error messages.
- Robust: valid, semantic markup that assistive technologies can interpret.
Each guideline has testable success criteria at levels A, AA and AAA. Most organisations target WCAG 2.1 or 2.2 level AA.
Our broken checkout page
<html><head><title></title></head>
<img src="logo.png">
<h1>Checkout</h1> <h3>Delivery</h3>
<p class="low">Free delivery on orders over 50 pounds</p> <!-- #aaa on white -->
<input type="text" placeholder="Email">
<input type="checkbox" id="t"> Accept terms
<div class="btn" onclick="pay()">Pay now</div>
<a href="#"></a> <a href="/terms">click here</a> <button></button>
<select><option>UK</option><option>India</option></select>
<table><tr><td>Item</td><td>Price</td></tr> ...</table>
Every line contains a common real-world mistake: no language or title, an image without alt text, a skipped heading level, pale text, inputs without labels, a “button” made from a div, empty and vague links, an icon button with no name, an unlabelled select and a table with no header cells.
Running axe-core
const { JSDOM } = require("jsdom");
const axeSrc = require("axe-core").source;
const dom = new JSDOM(html, { runScripts: "outside-only", pretendToBeVisual: true });
dom.window.eval(axeSrc);
const r = await dom.window.axe.run(dom.window.document, {
runOnly: { type: "tag", values: ["wcag2a", "wcag2aa", "wcag21aa", "best-practice"] } });
axe-core is the engine behind axe DevTools, Lighthouse’s accessibility audit and many test-framework plugins. We loaded it into a jsdom document so it could run headless in Node. jsdom has no rendering engine, so axe reported colour contrast as “incomplete” rather than pass or fail; contrast needs a real browser, or a manual calculation as we did below.
What axe found
| Rule | Impact | WCAG |
|---|---|---|
| image-alt (image without alt text) | critical | 1.1.1 |
| button-name (empty button) | critical | 4.1.2 |
| label (form field without a label) | critical | 4.1.2 |
| select-name (unlabelled select) | critical | 4.1.2 |
| document-title (empty title) | serious | 2.4.2 |
| html-has-lang (no lang attribute) | serious | 3.1.1 |
| link-name (empty link) | serious | 2.4.4, 4.1.2 |
| heading-order (h1 followed by h3) | moderate | best practice |
| region (content outside landmarks) | moderate | best practice |
Nine rules failed, across 20 elements (12 of them for the landmark rule). Each finding names the element and links to a help page, which makes automated scans excellent for catching structural mistakes quickly and repeatably. Those are exactly the bugs that slip back in during later changes, which is why scans belong in every regression run.
What axe did not report
- The clickable div.
<div onclick>Pay now</div>cannot be reached with Tab or activated with Enter, so keyboard and screen reader users cannot pay. No rule fired. - “click here”. The link had text, so it passed the link-name rule, but out of context (“Links” list in a screen reader) it means nothing.
- The table without headers. A data table made only of
tdcells gives screen reader users no way to know which column a value belongs to. - Duplicate IDs. Two elements shared
id="dup", which can break label and ARIA references; no rule in this axe run reported it. - Colour contrast, which needs rendering.
Accessibility experts commonly estimate that automated tools find only about a third of WCAG issues, and comparisons of tools against manual audits support that. Our small page showed why: tools check that things exist; people judge whether they work.
Checking contrast
def ratio(fg, bg): # WCAG relative luminance formula
la, lb = sorted((lum(fg), lum(bg)), reverse=True)
return (la + 0.05) / (lb + 0.05)
#aaa on white 2.32 fails AA (needs 4.5 for normal text)
#767676 on white 4.54 passes AA
#595959 on white 7.0 passes AAA
white on #36c 5.37 passes AA
WCAG defines contrast as a ratio from 1:1 (no contrast) to 21:1 (black on white). Normal text needs at least 4.5:1 for level AA, and large text (24 px, or 18.66 px bold) needs 3:1. Our pale grey was 2.32:1. The common “light grey” #767676 is almost exactly at the limit, and #595959 reaches the AAA level of 7:1. Browser developer tools show the ratio when you inspect text, which is the quickest manual check.
The fixed page
<html lang="en"><title>Checkout - Demo Shop</title>
<header><img src="logo.png" alt="Demo Shop"></header>
<main>
<h1>Checkout</h1> <h2>Delivery</h2>
<label for="email">Email</label> <input type="email" id="email" autocomplete="email">
<input type="checkbox" id="t"> <label for="t">Accept terms</label>
<button type="button">Pay now</button>
<a href="/terms">Read the terms and conditions</a>
<table><caption>Order summary</caption><tr><th scope="col">Item</th><th scope="col">Price</th></tr>
axe reported 0 violations and 29 passing checks on the fixed page. Most fixes were not visual changes at all: a lang attribute, a real title, alt text, proper label elements, a real button, a descriptive link, landmark elements and table headers. Native HTML elements bring keyboard support and correct roles for free, which is why “use the right element” fixes most problems.
Manual checks every tester can do
- Keyboard only: unplug the mouse. Can you reach every link, field and button with Tab, see where focus is, operate everything with Enter and Space, and escape every dialog?
- Zoom to 200 and 400 percent: does text reflow without horizontal scrolling or overlapping?
- Read the headings and links lists (screen readers and browser extensions show them): do they make sense out of context?
- Check forms: do errors say what went wrong and how to fix it, next to the field, not only in red?
- Check media: captions for video, transcripts for audio, no autoplay with sound.
- Check motion and time limits: can animations be paused, and can users extend timeouts?
These checks fit naturally into exploratory testing sessions and take minutes once they are habit.
Screen reader testing
Use at least one screen reader with the browser it is most often paired with: NVDA with Firefox or Chrome on Windows, VoiceOver with Safari on macOS and iOS, TalkBack with Chrome on Android. Navigate by headings, landmarks and form fields, and listen for missing names (“button”, “link”, “edit text” with no label), wrong reading order and announcements that never happen, such as an added-to-basket message. Real users with disabilities, included through usability studies, find issues no checklist anticipates.
Automating accessibility checks in CI
// Playwright example (pattern, not run here)
import AxeBuilder from "@axe-core/playwright";
const results = await new AxeBuilder({ page }).withTags(["wcag2a", "wcag2aa"]).analyze();
expect(results.violations).toEqual([]);
Running axe inside end-to-end tests catches regressions on every pull request, including colour contrast, because Playwright renders real pages. Start by failing only on critical and serious issues, fix the backlog, then tighten. Our guide to Playwright in GitHub Actions shows the CI setup, and end-to-end testing best practices covers keeping such suites stable.
Accessibility testing checklist
| Area | Check | Tool or method |
|---|---|---|
| Page | Title, language, landmarks, one h1, logical heading order | axe, manual |
| Images | Meaningful alt text; decorative images have empty alt | axe finds missing, human judges quality |
| Forms | Visible labels, linked to fields; clear errors; autocomplete | axe, manual |
| Keyboard | Everything reachable and operable; visible focus; no traps | Manual |
| Contrast | 4.5:1 normal text, 3:1 large text and UI components | Browser devtools, axe in a real browser |
| Links and buttons | Descriptive names; real button elements | axe, manual |
| Tables | Header cells with scope; caption | Manual |
| Zoom and reflow | Usable at 400 percent width | Manual |
| Assistive tech | Screen reader announces names, roles and changes | NVDA, VoiceOver, TalkBack |
Write accessibility acceptance criteria into stories and test cases from the start, as described in our test case writing guide; fixing accessibility late is far more expensive.
Final thoughts
Accessibility testing works best as two layers. Automated scans with axe-core catch structural problems fast and repeatably; on our page they found nine. Manual checks catch what only a person can judge, such as a div that cannot be reached by keyboard, a meaningless link and unreadable contrast. Use native HTML, test with a keyboard and a screen reader, run axe in CI, and you will remove most barriers long before an audit, or a frustrated user, finds them.
Frequently asked questions
What is accessibility testing?
Testing that a website or app can be used by people with disabilities, including those who use keyboards, screen readers, magnifiers or voice control, usually measured against WCAG level AA.
Can accessibility testing be fully automated?
No. Automated tools such as axe find a portion of issues, often estimated at around a third. Keyboard use, meaningful alt text, reading order and clear errors need manual checks.
What is the minimum contrast ratio for WCAG AA?
4.5 to 1 for normal text and 3 to 1 for large text and for user interface components such as input borders and icons.
Which screen reader should testers use?
Use NVDA with Chrome or Firefox on Windows, VoiceOver with Safari on Apple devices, and TalkBack on Android, matching what your users are most likely to have.
What is the difference between WCAG A, AA and AAA?
They are conformance levels. A covers the most basic requirements, AA adds the widely required standard such as contrast and captions, and AAA is the strictest level, rarely required for whole sites.
Keep learning
Need help with testing, WordPress or SEO?
We help teams ship better software and grow their sites. Tell us what you are working on and we will suggest a clear next step.