DEV Community

QAandBeyond
QAandBeyond

Posted on Edited on

Building a Configuration-AI Driven AccessibilityTesting Utility

Technical blog | Quality Engineering | WCAG Accessibility Automation | By Piyush Narlawar

Accessibility testing should be part of the regular Quality Engineering process rather than a one-time compliance activity. This utility helps QE teams automate common accessibility checks, identify WCAG violations early, and integrate accessibility quality gates into CI/CD pipelines.

Solution Overview

The Java-based utility combines Selenium WebDriver, custom accessibility checks, and optional axe-core scanning. Testers define URLs, browsers, login settings, pages, elements, user journeys, and rules through YAML configuration instead of changing Java code.
The solution primarily targets WCAG Level A and AA, including relevant WCAG 2.1 and 2.2 criteria.

Architecture

The utility uses a modular, layered architecture so that each capability can be maintained and extended independently.

Architecture

Architecture Components
Configuration layer:Reads browser, authentication, pages, elements, journeys, rules, and report settings.
Test runner:Controls the scan lifecycle, login, navigation, crawling, user journeys, and error handling.
Driver layer:Creates local or remote Selenium sessions for Chrome, Edge, Firefox, and Safari.
Browser inspection layer:Collects DOM, ARIA, focus, CSS, language, and layout information from the rendered page.
Check engine:Evaluates page, element, keyboard, visual, interaction, and internationalization requirements.
Analysis layer:Assigns severity, explains failures, prioritizes issues, and prepares manual checks.
Reporting layer:Converts the common result model into HTML, JSON, and JUnit output.

Execution Flow

Accessibility testing Execution Flow

Technology Stack

Technology Stack

Because the stack is configuration-driven, the same framework can be pointed at a new application, browser, or user journey by changing configuration rather than rewriting the test code.

Testing Capabilities
The utility validates:

  • Page titles, language, landmarks, and heading structure
  • Accessible names, labels, semantic roles, and ARIA states
  • Form instructions and validation messages
  • Image alternative text and link purpose
  • Color contrast
  • Keyboard reachability, focus order, visible focus, and keyboard traps
  • Touch-target size, clipped content, and responsive reflow
  • Tables, dropdowns, menus, dialogs, alerts, and popups
  • Language, direction, and translation issues
  • Authenticated pages and end-to-end user journeys

It can also crawl an application to discover pages. Configurable page, depth, and route restrictions prevent uncontrolled or destructive navigation.

Reporting and CI/CD
The framework generates:
HTML:A readable report for QE, development, and product teams
JSON:Machine-readable findings for dashboards and integrations
JUnit XML:Standard test output for CI platforms

Each finding includes its WCAG reference, severity, explanation, and recommended remediation. The pipeline can fail when findings reach a configured severity.

Code Snippet

With this setting, a build does not silently pass with serious accessibility violations. The team sees the failure in the same pipeline it already uses for functional quality.

Sample Run: SampleShop — Demo E-commerce Site

The recreated illustrations on the next page show the utility in use. The tester enters the application address, adds a sign-in if one is needed, sets the options, and presses Run scan.

Report header: Base URL https://www.sampleshop.example/ • Browser: chrome • Started: 2026-11-20T20:25:39 UTC • Finished: 2026-11-20T20:26:36 UTC • Pages validated: 1

Execution Sample Report

Tool and Results

Tool Image

Figure 1 - The WCAG Accessibility Testing Utility setup, configured for SampleShop — DemoE-commerce Site at https://www.sampleshop.example/ in Chrome. This is a recreated illustration, not an original screenshot from tool.

Why this approach works in regular QE

Configuration keeps accessibility checks repeatable across applications and releases. Custom checks cover journeys, keyboard behaviour, and responsive layout that a single-page scan can miss, while optional axe-core adds a proven rule set. Severity, WCAG references, and explanations turn along list of violations into work a team can prioritize, and the CI quality gate stops new serious issues from reaching production unnoticed.
Automation does not replace manual testing. The report deliberately keeps manual checks visible -35 in this sample run - so keyboard, screen-reader, and judgement-based checks stay part of the process.

Top comments (0)