Accessibility Testing

Accessibility Testing

Guides an AI agent to test web apps for WCAG compliance with axe, Playwright, Cypress and Jest, covering ARIA, keyboard navigation and screen reader checks.

Skill files9 files

references/

scripts/

templates/

SKILL.md103 lines
1
---
2
name: accessibility-testing
3
description: >
4
Test web applications for WCAG compliance and ensure usability for users with
5
disabilities. Use for accessibility test, a11y, axe, ARIA, keyboard
6
navigation, screen reader compatibility, and WCAG validation.
7
---
8
9
# Accessibility Testing
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
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.
22
23
## When to Use
24
25
- Validating WCAG 2.1/2.2 compliance
26
- Testing keyboard navigation
27
- Verifying screen reader compatibility
28
- Testing color contrast ratios
29
- Validating ARIA attributes
30
- Testing form accessibility
31
- Ensuring focus management
32
- Testing with assistive technologies
33
34
## Quick Start
35
36
Minimal working example:
37
38
```typescript
39
// tests/accessibility/homepage.a11y.test.ts
40
import { test, expect } from "@playwright/test";
41
import AxeBuilder from "@axe-core/playwright";
42
43
test.describe("Homepage Accessibility", () => {
44
test("should not have any automatically detectable WCAG A or AA violations", async ({
45
page,
46
}) => {
47
await page.goto("/");
48
49
const accessibilityScanResults = await new AxeBuilder({ page })
50
.withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"])
51
.analyze();
52
53
expect(accessibilityScanResults.violations).toEqual([]);
54
});
55
56
test("navigation should be accessible", async ({ page }) => {
57
await page.goto("/");
58
59
const results = await new AxeBuilder({ page }).include("nav").analyze();
60
61
expect(results.violations).toEqual([]);
62
});
63
64
// ... (see reference guides for full implementation)
65
```
66
67
## Reference Guides
68
69
Detailed implementations in the `references/` directory:
70
71
| Guide | Contents |
72
|---|---|
73
| [axe-core with Playwright](references/axe-core-with-playwright.md) | axe-core with Playwright |
74
| [Keyboard Navigation Testing](references/keyboard-navigation-testing.md) | Keyboard Navigation Testing |
75
| [ARIA Testing](references/aria-testing.md) | ARIA Testing |
76
| [Jest with jest-axe](references/jest-with-jest-axe.md) | Jest with jest-axe |
77
| [Cypress Accessibility Testing](references/cypress-accessibility-testing.md) | Cypress Accessibility Testing |
78
| [Python with Selenium and axe](references/python-with-selenium-and-axe.md) | Python with Selenium and axe |
79
80
## Best Practices
81
82
### ✅ DO
83
84
- Test with real assistive technologies
85
- Include keyboard-only users
86
- Test color contrast
87
- Use semantic HTML
88
- Provide text alternatives
89
- Test with screen readers
90
- Run automated tests in CI
91
- Follow WCAG 2.1 AA standards
92
93
### ❌ DON'T
94
95
- Rely only on automated tests (they catch ~30-40% of issues)
96
- Use color alone to convey information
97
- Skip keyboard navigation testing
98
- Forget focus management in dynamic content
99
- Use div/span for interactive elements
100
- Hide focusable content with display:none
101
- Ignore ARIA best practices
102
- Skip manual testing
103

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,693 prompts

More by @OpenSourceBuffGuy

See all
Woman in satin bustier taking indoor selfie prompt image

Woman in satin bustier taking indoor selfie

Recreates a reference smartphone selfie as a new adult woman in a luxury living room, matching crop, light and styling while leaving out all on-screen text and icons.

image-prompt, json-prompt, gpt-image, reference-image, selfie, portrait, woman, photorealistic, smartphone-photo, natural-light, fashion, jewelry, hairstyles, interior-design, negative-prompt, structured-output, vertical-format, close-up, social-media-graphic, long-form, advanced

Chest-up editorial portrait in oversized black blazer prompt image

Chest-up editorial portrait in oversized black blazer

Turns a reference photo into a chest-up fashion editorial portrait in an oversized black blazer, with a locked identity and soft side sunlight on a white wall.

image-prompt, gpt-image, reference-image, face-reference, portrait, woman, editorial, fashion, fashion-shoot, medium-shot, natural-light, white-background, vertical-format, photorealistic, luxury, negative-prompt, guardrails, photography, for-photographers, for-artists, quick, bokeh, headshot, soft-lighting

Skater clears a stair set in one low tracking shot prompt image

Skater clears a stair set in one low tracking shot

Writes a 30-second continuous low tracking shot of a skateboarder clearing stairs at golden hour, in six-second beats with a locked face and outfit.

video-prompt, timed-beats, tracking-shot, single-take, camera-movement, action, sports, kling, character-consistency, golden-hour, low-angle, natural-light, wide-shot, photorealistic, cinematic, guardrails, for-filmmakers, man, full-body, slow-motion, structured-output

Reviews

Loading reviews…

Discussion

Loading comments…