Accessibility Use Case Definition Language (UCDL) and Runner
A specification for authoring, validating, and executing structured accessibility use case tests
Permalink to A specification for authoring, validating, and executing structured accessibility use case testsStatus of This Document
Permalink to Status of This DocumentThis is the formal specification for the Accessibility Use Case Definition Language (UCDL) and the conformance requirements for processors that consume it. The document is intended to be read in the style of a W3C Recommendation: sections marked normative define requirements, sections marked informative provide context, examples, and rationale.
This document is published by AFixt as the authoritative description of the file
format, the step language, the processing model, the execution modes, and the
reporting format implemented by the @afixt/usecase-runner reference
implementation. It supersedes any conflicting prose in spec.md,
Use-case-description.md, README.md, or TUTORIAL.md. Where those documents
and this specification disagree, this specification wins.
The language is versioned independently of the reference implementation.
This document defines UCDL 1.0. A processor states which language version it
implements, and a document MAY declare the version it is written to with a
top-level ucdl field (§2.4).
Package versions of @afixt/usecase-runner move on their own schedule and do
not imply a language release.
Copyright © 2026 AFixt. This document is available under the W3C Document License. The code examples in it — use case documents, step lists, and other snippets — are additionally available under the MIT License, so they can be copied into a project without carrying the document licence's terms with them.
Abstract
Permalink to AbstractThis specification defines:
- A YAML-based document format ("use case document") for describing accessibility test cases in terms of user-visible roles, accessible names, and intent-bearing actions.
- A small, keyword-driven domain-specific language ("Step Language") for expressing the steps of a use case in a way that is readable by non-developers and that maps unambiguously to accessibility-aware browser automation.
- A processing model that takes one or more use case documents and produces
either (a) standalone Playwright
.spec.tsfiles or (b) live execution results, together with a structured report. - A reporting model and scoring rubric that align with AFixt's manual use case testing methodology so that automated and manual results can be compared and aggregated.
The design centers a single principle: all element targeting goes through the
accessibility tree. CSS selectors and XPath are not part of the authoring
surface. If an element cannot be identified by its role and accessible name,
that is reported as a finding, not worked around. Two narrow escape hatches,
id and data-* (§5.4.2), exist for the
cases where a test must reach the element a finding is about; they are
discouraged, their use SHOULD be flagged in reports
(§5.4.2), and a step that uses one
establishes nothing about the element's exposure to assistive technology.
Table of Contents
Permalink to Table of Contents- Introduction
- Conformance
- Terminology
- Use Case Document Format
- Step Language
- Target Resolution Model
- Processing Model
- Execution Modes
- Audit Steps
- Reporting
- Scoring
- Configuration
- Programmatic API
- Command-Line Interface
- Accessibility-First Design
- Security and Privacy Considerations
- Appendix A. ABNF Grammar for Steps
- Appendix B. Use Case Document Schema
- Appendix C. Examples
- Appendix D. Glossary
- Appendix E. References
- Appendix F. Acknowledgments