1. Home
  2. Blog
  3. Software Testing

Software Testing

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.

9 min read
Accessibility testing: WCAG checklist, automated tools and manual checks

Key takeaways

  • 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 td cells 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

  1. 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?
  2. Zoom to 200 and 400 percent: does text reflow without horizontal scrolling or overlapping?
  3. Read the headings and links lists (screen readers and browser extensions show them): do they make sense out of context?
  4. Check forms: do errors say what went wrong and how to fix it, next to the field, not only in red?
  5. Check media: captions for video, transcripts for audio, no autoplay with sound.
  6. 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

Work with Stack Quora

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.

Keep reading

More guides on testing, AI & modern development

Enjoyed this article? Pick a topic and jump straight into our newest tutorials.

Artificial Intelligence

Random Forest in Python: Bagging, Feature Sampling and OOB From Scratch

Random forest in Python from scratch: bootstrap sampling, feature sampling, number of trees, out-of-bag evaluation and impurity vs permutation importance.

Read article →
Software Development

MIME Types Explained: Content-Type, nosniff and a Common Types List

MIME types explained and tested in a browser: Content-Type, nosniff, scripts and stylesheets with wrong types, a common MIME types…

Read article →
DevOps

Git Clean Explained: Remove Untracked Files Without Regret

Git clean explained with dry runs: -n, -f, -d, -x, -X, exclusions, paths, nested repositories and interactive mode, plus a…

Read article →
Test Automation

Pytest approx: Comparing Floats With rel, abs and Collections

Pytest approx explained: default tolerances, the near-zero trap, rel and abs, lists and dicts, NaN, NumPy, and how it differs…

Read article →
Software Testing

Accessibility Testing: WCAG Checklist, Automated Tools and Manual Checks

Accessibility testing explained: WCAG basics, an axe-core scan of a broken and a fixed page, what automation missed, contrast checks…

Read article →
Databases & SQL

SQL UNPIVOT: Turn Columns Into Rows, 4 Ways Tested

SQL UNPIVOT explained: turn columns into rows with UNION ALL, CROSS JOIN with CASE, JSON functions or native UNPIVOT, with…

Read article →
Software Development

Intl.NumberFormat in JavaScript: Currency, Compact, Percent and Units

Intl.NumberFormat in JavaScript: locales, currency, compact notation, percent, units, rounding, formatToParts, the non-breaking space trap and formatter reuse.

Read article →
Software Development

Python Abstract Class: ABC, abstractmethod and When to Use Them

Python abstract class explained: ABC and abstractmethod, abstract properties, shared logic with super, register, collections.abc and ABC vs Protocol, tested.

Read article →
Software Development

Python Subprocess Explained: run, Capture Output, Timeouts and Safety

Python subprocess explained with tested examples: run, capture_output, check, timeouts, input, environment, shell injection, encoding on Windows and Popen streaming.

Read article →
Databases & SQL

SQL EXPLAIN Plan: How to Read Query Plans and Fix Slow Queries

SQL EXPLAIN plan explained: read scans, index searches, covering indexes and temporary sorts, with before and after timings for five…

Read article →
Artificial Intelligence

Decision Tree in Python: Gini, Entropy and Overfitting From Scratch

Decision tree in Python from scratch: Gini impurity, entropy, information gain, best splits, readable rules, and how depth and leaf…

Read article →
Software Development

URL Query Parameters: Encoding, URLSearchParams and Common Traps

URL query parameters explained: reading and building them with URLSearchParams and urllib, percent encoding, plus signs, repeated keys and nine…

Read article →
DevOps

Git Blame Explained: Find Who Changed a Line, and Why

Git blame explained with a real repository: ignore whitespace, line ranges and functions, ignore-revs files for formatting commits, moved code…

Read article →
Test Automation

Pytest Benchmark: Measure Speed and Catch Performance Regressions

Pytest benchmark tutorial: the benchmark fixture, reading results, parametrized and pedantic benchmarks, saving baselines and failing the build on regressions.

Read article →
Software Testing

Defect Density: Formula, Worked Examples and How to Use It

Defect density explained: the formula, a five-module worked example, per KLOC vs per function point, severity weighting, defect removal efficiency…

Read article →
Databases & SQL

Case Insensitive Search in SQL: LOWER, LIKE, COLLATE and Indexes

Case insensitive search in SQL: LOWER, LIKE, COLLATE NOCASE and expression indexes compared with query plans, plus accented letters and…

Read article →
Databases & SQL

ON DELETE CASCADE in SQL: CASCADE vs SET NULL vs RESTRICT

ON DELETE CASCADE in SQL tested: CASCADE vs SET NULL vs RESTRICT, multi-level cascades, the SQLite foreign key pragma, row…

Read article →
Software Development

JavaScript BigInt Explained: Big Numbers, Division and JSON

JavaScript BigInt explained: the 2^53 limit, creating and converting BigInt, division, mixing types, JSON stringify and parse without losing digits,…

Read article →
Artificial Intelligence

Logistic Regression in Python: Sigmoid, Log Loss and Gradient Descent From Scratch

Logistic regression in Python from scratch: sigmoid, log loss, gradient descent, odds ratios, thresholds, sigmoid overflow and separable data, tested…

Read article →
DevOps

Git Worktree Explained: Work on Two Branches at Once

Git worktree explained: add, list, remove, prune, lock and detached worktrees, a hotfix workflow, and the errors you will hit,…

Read article →
Test Automation

Pytest ini Explained: addopts, markers, testpaths and Precedence

Pytest ini explained: testpaths, addopts, strict markers, xfail_strict, filterwarnings, minversion, config file precedence and command-line overrides, tested.

Read article →
Software Testing

Test Estimation Techniques: WBS, Three Point PERT and Monte Carlo

Test estimation techniques worked through: WBS, three point PERT, total uncertainty, a Monte Carlo check, percentage rules and Wideband Delphi.

Read article →
Databases & SQL

Gaps and Islands in SQL: Find Streaks and Missing Ranges

Gaps and islands in SQL: find login streaks and missing ranges with ROW_NUMBER, DENSE_RANK, LAG and LEAD, plus the duplicate…

Read article →
Databases & SQL

INSERT INTO SELECT in SQL: Copy Rows Between Tables Safely

INSERT INTO SELECT in SQL: copy rows between tables with chosen columns, joins and summaries, avoid duplicates on reruns, upsert,…

Read article →
Artificial Intelligence

Linear Regression in Python: Least Squares From Scratch, With R Squared

Linear regression in Python from scratch: closed form, NumPy least squares and gradient descent, R squared, RMSE, outliers and curved…

Read article →
DevOps

Git Remote Explained: Add, Set-URL, Rename, Remove and Push URLs

Git remote explained: add, set-url, separate push URLs, rename, remove and prune, plus how to avoid leaking tokens in remote…

Read article →
Test Automation

Pytest Mock: mocker.patch, spy, side_effect and autospec Explained

Pytest mock explained: mocker.patch, return_value, side_effect, spy, autospec and PropertyMock, with tested examples for APIs, clocks and retries.

Read article →
Software Testing

System Testing Explained: Types, Process and a Real End-to-End Example

System testing explained: types, entry and exit criteria, the process, and a real end-to-end test suite run against a small…

Read article →
Artificial Intelligence

Naive Bayes Classifier Explained: Build a Spam Filter in Python

Naive Bayes classifier explained by building a spam filter in Python: Bayes rule, the naive assumption, Laplace smoothing, log probabilities…

Read article →
DevOps

Git Branch Explained: Create, Switch, Rename, Delete and Recover

Git branch explained with tested commands: list, create, switch, rename, delete, merged checks, recovering deleted branches, remote tracking and naming.

Read article →
Test Automation

Pytest raises: Testing Exceptions, match and excinfo

Pytest raises explained with tested examples: match regexes, excinfo, custom and chained exceptions, parametrized error cases, pytest.warns and common mistakes.

Read article →
Software Testing

Non Functional Testing: Types, Metrics and a Real Load Test

Non functional testing explained: 10 key types, measurable requirements, latency percentiles and what a small real load test revealed about…

Read article →
Artificial Intelligence

K Means Clustering Explained: How It Works, With Python Code

K means clustering explained: the algorithm, a from-scratch NumPy version, choosing k with the elbow and silhouette methods, k-means++, scaling…

Read article →
DevOps

Git Log Explained: 15 Useful Commands and Pretty Formats

Git log explained with 15 tested commands: oneline, graph, filters by author, date, message and code, file history, stats, pretty…

Read article →
Test Automation

Pytest conftest.py Explained: Shared Fixtures, Hooks and Overrides

Pytest conftest.py explained with a tested suite: shared fixtures, scope and teardown, folder overrides, autouse, custom options, markers and useful…

Read article →
Software Testing

Usability Testing: Methods, Metrics, SUS Score and Checklist

Usability testing explained: methods, planning, writing tasks, running sessions, metrics, SUS scoring, how many users you need and a practical…

Read article →