Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Add accessibility test library - #6118

Merged
amyleadem merged 16 commits into
mainfrom
5891-accessibility-test-library
Apr 23, 2026
Merged

Add accessibility test library#6118
amyleadem merged 16 commits into
mainfrom
5891-accessibility-test-library

Conversation

@amyleadem

@amyleadem amyleadem commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Added the accessibility test library along with related documentation and tooling. The yaml-based accessibility test library maps granular, plain language manual accessibility tests to WCAG 2.2 AA. This reusable test data can be used to quickly build manual test suites for components, and opens the door to additional tooling.

This PR also adds an experimental prompt (/accessibility-tests-generate-component-tests) that can help accessibility specialists identify which tests should be included for a given component. This prompt is in beta while we continue to refine our expectations and standards across component types.

Stable items:

Beta:

  • Added READMEs with human- and machine-readable instructions for using the test library:
    • README - accessibility tests
    • README - components
    • README - test-library
  • Added machine-readable skills and prompts:
    • Generating component tests and files
      • Skills and prompt to select component accessibility tests and build files
      • Prompt to audit existing component accessibility tests
      • Prompt to add testing metadata to the component test yaml files
      • Prompt to add component accessibility test results to component pages
    • Skill for creating test data for the testing library

Note

This work originated in a separate prototype PR. This PR includes the files needed for the MVP release, but there are some component files in there that might be helpful reference in the future.

Related Issue

If this PR resolves an open issue, please add the issue number here.

Closes #5819

Preview Environment Links

Open Preview Environment

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Publishes a new VA Design System Accessibility Test Library (YAML test definitions + component result files) and adds Liquid includes, styles, and contributor tooling (Copilot prompts / Claude skills) to render and maintain accessibility test results on the documentation site.

Changes:

  • Adds WCAG-principle-based test library YAML files plus configuration and documentation.
  • Adds Liquid includes/pages to render the public test library catalog and per-component test results.
  • Adds AI workflow assets (GitHub prompts and Claude skills) intended to generate, update, and audit component test result files.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 21 comments.

Show a summary per file
File Description
src/assets/stylesheets/application.scss Includes new accessibility test styling partial in the global stylesheet build.
src/assets/stylesheets/_components/_accessibility-tests.scss Adds styling for test library and component test-result displays.
src/_includes/accessibility-test-results.html New renderer for per-component accessibility test summaries and detailed environment results.
src/_includes/accessibility-test-lookup.html Helper include to resolve test definitions (including nested subtests) by ID.
src/_includes/accessibility-test-library-loader.html Loads and concatenates WCAG principle test definitions for use by other includes.
src/_includes/accessibility-test-library-list.html Renders the full public test library grouped by WCAG criterion.
src/_includes/accessibility-test-env-lookup.html Resolves environment IDs to display names from the shared config.
src/_data/accessibility-tests/README.md Top-level documentation for the accessibility test data layout and contributor workflows.
src/_data/accessibility-tests/components/va-statement-of-truth.yml Adds initial (placeholder) test coverage mapping for va-statement-of-truth.
src/_data/accessibility-tests/components/va-details.yml Adds populated test results for va-details across multiple environments.
src/_data/accessibility-tests/components/README.md Documentation for creating/maintaining component test result YAML files.
src/_data/accessibility-tests/test-library/README.md Detailed documentation for writing and maintaining test library entries.
src/_data/accessibility-tests/test-library/1-perceivable.yml Adds WCAG Principle 1 test definitions (Perceivable).
src/_data/accessibility-tests/test-library/2-operable.yml Adds WCAG Principle 2 test definitions (Operable).
src/_data/accessibility-tests/test-library/3-understandable.yml Adds WCAG Principle 3 test definitions (Understandable).
src/_data/accessibility-tests/test-library/4-robust.yml Adds WCAG Principle 4 test definitions (Robust).
src/_data/accessibility-tests/test-library/_config.yml Adds environment definitions, categories, and library metadata.
src/_accessibility/test-library.md Adds the public-facing Accessibility Test Library page that renders the catalog.
src/_accessibility/accessibility-testing-for-design-system-components.md Updates testing methodology guidance and links to the new test library page.
.github/prompts/accessibility-tests-generate-component-tests.prompt.md Adds Copilot prompt to generate new component test YAML files.
.github/prompts/accessibility-tests-generate-metadata.prompt.md Adds Copilot prompt to add/update test run metadata in component YAML files.
.github/prompts/accessibility-tests-audit.prompt.md Adds Copilot prompt to audit component YAML files for compliance/coverage.
.github/prompts/accessibility-tests-add-to-component-page.prompt.md Adds Copilot prompt to insert the “Accessibility tests” section on component docs pages.
.claude/skills/accessibility-tests/writing-entries/SKILL.md Adds Claude skill pointer for consistent writing of test library entries.
.claude/skills/accessibility-tests/test-selection/SKILL.md Adds Claude skill for selecting applicable tests for a component based on features.

Comment thread src/_includes/accessibility-test-library-loader.html Outdated
Comment thread src/_includes/accessibility-test-library-loader.html Outdated
Comment thread src/_includes/accessibility-test-env-lookup.html Outdated
Comment thread src/_includes/accessibility-test-results.html Outdated
Comment thread src/_includes/accessibility-test-results.html Outdated
Comment thread .github/prompts/accessibility-tests-audit.prompt.md
Comment thread .claude/skills/accessibility-tests/test-selection/SKILL.md
Comment thread .claude/skills/accessibility-tests/writing-entries/SKILL.md Outdated
Comment thread src/_data/accessibility-tests/README.md Outdated
Comment thread src/_accessibility/test-library.md Outdated
@amyleadem amyleadem changed the title Publish accessibility test library Add accessibility test library Apr 10, 2026
@amyleadem
amyleadem marked this pull request as ready for review April 13, 2026 17:06
@amyleadem
amyleadem requested a review from a team as a code owner April 13, 2026 17:06
@amyleadem
amyleadem requested a review from jeana-adhoc April 13, 2026 17:06
@amyleadem

Copy link
Copy Markdown
Collaborator Author

This PR is ready for review. I'd like to get review from:

  • An accessibility specialist (@jeana-adhoc) to review the page content and test library for accuracy and clarity
  • Someone less experienced in accessibility to make sure the content makes sense, is scannable, follows our standards, and answers questions that less technical folks might have.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I did not include the component page update to include these test results on the va-details page, but that is only because I wasn't sure if it was ready and if we wanted to break it out into a follow-on PR. @jeana-adhoc let me know if you have a preference on releasing this test library with the va-details page update.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to have a cleaner version number, I could run through the tests again on the latest release instead of an unreleased version.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it was legit for real. And should be releasable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a blank test file? I don't see it loading on the statement-of-truth component page. Should this be in this PR?

it pronounces content in the correct language.
automation_coverage: full
automation_notes: >-
Custom test recommended. Applies to page-level tests, no component-level test needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other time can you help me understand this yml formatting?

What are the |'s and >- doing here?

### Environments tested

Each test result shows the environments and component versions tested. We track results for each environment because accessibility behavior can vary across browsers and assistive technologies. For the complete list of environments we test in, see [How we audit components](/accessibility/accessibility-testing-for-design-system-components#how-we-audit-components).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it'd be helpful to show a generic table here of the test results to give a visual of the various parts?

@jeana-adhoc

Copy link
Copy Markdown
Contributor

@amyleadem - this is really good. One question I have -- and this is probably for a larger conversation. Do we need to mention/talk about, on the doc site, any of the copilot skills that are available? It seems right now that the only way someone would know about them is by being in the codebase. This might be ok, as I think the prompts, for now, are only for us DST.

@jeana-adhoc jeana-adhoc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so excited about this.

LGTM!

@amyleadem
amyleadem merged commit f20ab08 into main Apr 23, 2026
5 checks passed
@amyleadem
amyleadem deleted the 5891-accessibility-test-library branch April 23, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility audit - Finalize and publish test suite

3 participants