accessibility-testing · aj-geddes — Claude Code skill: WCAG and a11y tests
A skill that walks your agent through WCAG checks: axe scans, keyboard navigation, ARIA, screen readers. Useful when a project has to meet a11y requirements.
npx skills add aj-geddes/useful-ai-prompts --skill accessibility-testing -a claude-codeWhat accessibility-testing does
The skill hands your agent ready-made accessibility testing recipes. It ships a minimal @playwright/test example built on @axe-core/playwright: open the page, run the scanner with the wcag2a, wcag2aa, wcag21a and wcag21aa tags, then assert the violations list is empty. Narrow the scan to one region, like nav, the same way.
Under references/ sit longer guides: axe-core with Playwright, keyboard navigation testing, ARIA testing, Jest with jest-axe, Cypress, and Python with Selenium and axe. Pick the one matching your stack.
One caveat the author states outright: automated tests catch roughly 30-40% of issues. Manual screen reader passes and a keyboard-only walkthrough stay on your list, otherwise a chunk of barriers never shows up. The skill runs in Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
What it helps with
- run an axe scan on a page and get the WCAG A and AA violations
- check that the UI works with a keyboard alone, no focus traps
- catch broken ARIA attributes before release
- wire contrast and text alternative checks into CI
- find a working example for Jest, Cypress or Selenium
Example prompts for the agent
- run an axe scan on the homepage and list WCAG AA violations
- test keyboard navigation through the login form
- write a jest-axe test for the cart component
How to install accessibility-testing
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill accessibility-testing -a claude-code2Manually: put the files in place
~/.claude/skills/accessibility-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/accessibility-testing/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill accessibility-testing -a codex2Manually: put the files in place
.agents/skills/accessibility-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill accessibility-testing -a cursor2Manually: put the files in place
.cursor/skills/accessibility-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts accessibility-testing2Manually: put the files in place
.github/skills/accessibility-testing/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill accessibility-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/accessibility-testingManually: put the files in place
.devin/skills/accessibility-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill accessibility-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about accessibility-testing
How do I install accessibility-testing in Claude?
Run npx skills add aj-geddes/useful-ai-prompts --skill accessibility-testing -a claude-code. The skill file lands at ~/.claude/skills/accessibility-testing/SKILL.md.
What does the accessibility-testing skill do?
It gives the agent templates and guides for testing web app accessibility: axe-core scans, keyboard navigation, ARIA, contrast, and screen reader compatibility.
Are automated tests enough for accessibility?
No. The skill's author puts automated coverage at around 30-40% of issues, so manual screen reader checks and a keyboard-only pass are still needed.
Source text
SKILL.md · MIT
---
name: accessibility-testing
description: >
Test web applications for WCAG compliance and ensure usability for users with
disabilities. Use for accessibility test, a11y, axe, ARIA, keyboard
navigation, screen reader compatibility, and WCAG validation.
---
# Accessibility Testing
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Accessibility testing ensures web applications are usable by people with disabilities, including those using screen readers, keyboard navigation, or other assistive technologies. It validates compliance with WCAG (Web Content Accessibility Guidelines) and identifies barriers to accessibility.
## When to Use
- Validating WCAG 2.1/2.2 compliance
- Testing keyboard navigation
- Verifying screen reader compatibility
- Testing color contrast ratios
- Validating ARIA attributes
- Testing form accessibility
- Ensuring focus management
- Testing with assistive technologies
## Quick Start
Minimal working example:
```typescript
// tests/accessibility/homepage.a11y.test.ts
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";
test.describe("Homepage Accessibility", () => {
test("should not have any automatically detectable WCAG A or AA violations", async ({
page,
}) => {
await page.goto("/");
const accessibilityScanResults = await new AxeBuilder({ page })
.withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"])
.analyze();
expect(accessibilityScanResults.violations).toEqual([]);
});
test("navigation should be accessible", async ({ page }) => {
await page.goto("/");
const results = await new AxeBuilder({ page }).include("nav").analyze();
expect(results.violations).toEqual([]);
});
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [axe-core with Playwright](references/axe-core-with-playwright.md) | axe-core with Playwright |
| [Keyboard Navigation Testing](references/keyboard-navigation-testing.md) | Keyboard Navigation Testing |
| [ARIA Testing](references/aria-testing.md) | ARIA Testing |
| [Jest with jest-axe](references/jest-with-jest-axe.md) | Jest with jest-axe |
| [Cypress Accessibility Testing](references/cypress-accessibility-testing.md) | Cypress Accessibility Testing |
| [Python with Selenium and axe](references/python-with-selenium-and-axe.md) | Python with Selenium and axe |
## Best Practices
### ✅ DO
- Test with real assistive technologies
- Include keyboard-only users
- Test color contrast
- Use semantic HTML
- Provide text alternatives
- Test with screen readers
- Run automated tests in CI
- Follow WCAG 2.1 AA standards
### ❌ DON'T
- Rely only on automated tests (they catch ~30-40% of issues)
- Use color alone to convey information
- Skip keyboard navigation testing
- Forget focus management in dynamic content
- Use div/span for interactive elements
- Hide focusable content with display:none
- Ignore ARIA best practices
- Skip manual testing
© aj-geddes · MIT · aj-geddes/useful-ai-prompts
Similar skills
All skills for Testing and QA →accessibility-testing by other authors comes first.