A declarative model for accessibility requirements
Jens Pelzetter · 2020 · Proceedings of the 17th International Web for All Conference (W4A) · doi:10.1145/3371300.3383339
Summary
This paper addresses a fundamental problem in automated accessibility testing: different tools produce inconsistent results because they each implement their own interpretation of WCAG guidelines in code, and the guidelines themselves contain ambiguity. The author proposes a declarative model — an ontology built using the Web Ontology Language (OWL) — that formally describes accessibility requirements in terms of what to check rather than how to check it. The model is based on the W3C's Accessibility Conformance Testing (ACT) Rules format, which defines two types of rules: atomic rules (single testable requirements) and composite rules (combinations of atomic rules). The ontology decomposes each ACT Rule into its constituent parts: applicability definitions (which elements a rule applies to) and expectations (what conditions those elements must meet). These are expressed through 48 reusable atomic tests such as matchesCssSelector(), hasRole(), hasAccessibleName(), hasAriaAttribute(), isIncludedInAccessibilityTree(), and hasExplicitRole(). Tests can be combined using logical operators allOf, oneOf, and negate. The paper walks through detailed examples including the "Button has accessible name" and "Image has accessible name" ACT Rules, showing how their applicability and expectation sections decompose into composable test primitives.
Key findings
The declarative model successfully separates the description of accessibility requirements from their implementation, meaning tool developers can share a common rule definition while implementing the underlying tests differently — for example, one tool might use browser APIs via a browser extension while another uses Selenium for headless testing. A prototype tool called web-a11y-auditor was built to validate the approach, consisting of a web application with a RESTful API, worker processes for executing tests, and a Firefox browser extension. The prototype uses Selenium WebDriver to evaluate pages against the DOM tree (not raw source), which is critical because modern pages are heavily modified by JavaScript. When ACT Rules were updated by the community during development, the prototype required no code changes — only the ontology file needed updating. However, initial attempts to use OWL reasoning to infer evaluation results did not scale: reasoning with available tools like Openllet became extremely slow and memory-intensive (requiring gigabytes of RAM) for pages with more than about 40 elements, which is far fewer than typical web pages contain. The author therefore used the ontology only to model rules, implementing the actual evaluation logic in code. The prototype also includes a semi-automated mode where tests that cannot be fully automated (e.g., "Does this heading describe its section?") are presented to users as yes/no questions.
Relevance
This work tackles a systemic problem in the accessibility testing ecosystem. The W3C's own tool list contains 136 entries, yet only 28 support WCAG 2.1, and studies show that different tools produce different results for the same page — with expert evaluators themselves only agreeing 76% of the time. A shared, formal, declarative model of accessibility rules could significantly improve consistency across tools and reduce the effort required to keep tools current as guidelines evolve. For organizations choosing accessibility testing tools, this research explains why tool results disagree and why relying on a single tool is insufficient. For tool developers, the ontology-based approach offers a maintainable architecture where adding or updating rules requires editing a declarative specification rather than changing code. The semi-automated approach — where fully automatable tests run first and human-judgment tests are queued for review — is a practical pattern for accessibility auditing workflows. Future directions include using NLP to generate rules from guideline text and combining the rules ontology with a disability ontology to personalize evaluations for specific user profiles.
Tags: automated testing · WCAG compliance · ACT Rules · ontology · accessibility evaluation · tool development
Standards referenced: WCAG 2.1 · ACT Rules · WAI-ARIA · EARL