Screen Reader Testing

Screen Reader Testing

Guides the AI through testing web apps with VoiceOver, NVDA, JAWS and TalkBack, with commands, checklists and ARIA debugging tips.

Skill files5 files

references/

SKILL.md246 lines
1
---
2
name: screen-reader-testing
3
description: Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.
4
---
5
6
# Screen Reader Testing
7
8
Practical guide to testing web applications with screen readers for comprehensive accessibility validation.
9
10
## When to Use This Skill
11
12
- Validating screen reader compatibility
13
- Testing ARIA implementations
14
- Debugging assistive technology issues
15
- Verifying form accessibility
16
- Testing dynamic content announcements
17
- Ensuring navigation accessibility
18
19
## Core Concepts
20
21
### 1. Major Screen Readers
22
23
| Screen Reader | Platform | Browser | Usage |
24
| ------------- | --------- | -------------- | ----- |
25
| **VoiceOver** | macOS/iOS | Safari | ~15% |
26
| **NVDA** | Windows | Firefox/Chrome | ~31% |
27
| **JAWS** | Windows | Chrome/IE | ~40% |
28
| **TalkBack** | Android | Chrome | ~10% |
29
| **Narrator** | Windows | Edge | ~4% |
30
31
### 2. Testing Priority
32
33
```
34
Minimum Coverage:
35
1. NVDA + Firefox (Windows)
36
2. VoiceOver + Safari (macOS)
37
3. VoiceOver + Safari (iOS)
38
39
Comprehensive Coverage:
40
+ JAWS + Chrome (Windows)
41
+ TalkBack + Chrome (Android)
42
+ Narrator + Edge (Windows)
43
```
44
45
### 3. Screen Reader Modes
46
47
| Mode | Purpose | When Used |
48
| ------------------ | ---------------------- | ----------------- |
49
| **Browse/Virtual** | Read content | Default reading |
50
| **Focus/Forms** | Interact with controls | Filling forms |
51
| **Application** | Custom widgets | ARIA applications |
52
53
Before testing on macOS, read [VoiceOver setup, commands, and checklists](references/voiceover.md).
54
55
For the required iOS Safari coverage, read [VoiceOver touch setup and gestures](references/voiceover-ios.md).
56
57
Before testing with NVDA, read [NVDA setup, modes, commands, and test scripts](references/nvda.md).
58
59
Before testing with JAWS or TalkBack, read [platform setup and commands](references/jaws-talkback.md).
60
61
## Common Test Scenarios
62
63
### 1. Modal Dialog
64
65
```html
66
<!-- Accessible modal structure -->
67
<div
68
role="dialog"
69
aria-modal="true"
70
aria-labelledby="dialog-title"
71
aria-describedby="dialog-desc"
72
>
73
<h2 id="dialog-title">Confirm Delete</h2>
74
<p id="dialog-desc">This action cannot be undone.</p>
75
<button>Cancel</button>
76
<button>Delete</button>
77
</div>
78
```
79
80
```javascript
81
// Focus management
82
function openModal(modal) {
83
// Store last focused element
84
lastFocus = document.activeElement;
85
86
// Move focus to modal
87
modal.querySelector("h2").focus();
88
89
// Trap focus
90
modal.addEventListener("keydown", trapFocus);
91
}
92
93
function closeModal(modal) {
94
// Return focus
95
lastFocus.focus();
96
}
97
98
function trapFocus(e) {
99
if (e.key === "Tab") {
100
const focusable = modal.querySelectorAll(
101
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',
102
);
103
const first = focusable[0];
104
const last = focusable[focusable.length - 1];
105
106
if (e.shiftKey && document.activeElement === first) {
107
last.focus();
108
e.preventDefault();
109
} else if (!e.shiftKey && document.activeElement === last) {
110
first.focus();
111
e.preventDefault();
112
}
113
}
114
115
if (e.key === "Escape") {
116
closeModal(modal);
117
}
118
}
119
```
120
121
### 2. Live Regions
122
123
```html
124
<!-- Status messages (polite) -->
125
<div role="status" aria-live="polite" aria-atomic="true">
126
<!-- Content updates will be announced after current speech -->
127
</div>
128
129
<!-- Alerts (assertive) -->
130
<div role="alert" aria-live="assertive">
131
<!-- Content updates interrupt current speech -->
132
</div>
133
134
<!-- Progress updates -->
135
<div
136
role="progressbar"
137
aria-valuenow="75"
138
aria-valuemin="0"
139
aria-valuemax="100"
140
aria-label="Upload progress"
141
></div>
142
143
<!-- Log (additions only) -->
144
<div role="log" aria-live="polite" aria-relevant="additions">
145
<!-- New messages announced, removals not -->
146
</div>
147
```
148
149
### 3. Tab Interface
150
151
```html
152
<div role="tablist" aria-label="Product information">
153
<button role="tab" id="tab-1" aria-selected="true" aria-controls="panel-1">
154
Description
155
</button>
156
<button
157
role="tab"
158
id="tab-2"
159
aria-selected="false"
160
aria-controls="panel-2"
161
tabindex="-1"
162
>
163
Reviews
164
</button>
165
</div>
166
167
<div role="tabpanel" id="panel-1" aria-labelledby="tab-1">
168
Product description content...
169
</div>
170
171
<div role="tabpanel" id="panel-2" aria-labelledby="tab-2" hidden>
172
Reviews content...
173
</div>
174
```
175
176
```javascript
177
// Tab keyboard navigation
178
tablist.addEventListener("keydown", (e) => {
179
const tabs = [...tablist.querySelectorAll('[role="tab"]')];
180
const index = tabs.indexOf(document.activeElement);
181
182
let newIndex;
183
switch (e.key) {
184
case "ArrowRight":
185
newIndex = (index + 1) % tabs.length;
186
break;
187
case "ArrowLeft":
188
newIndex = (index - 1 + tabs.length) % tabs.length;
189
break;
190
case "Home":
191
newIndex = 0;
192
break;
193
case "End":
194
newIndex = tabs.length - 1;
195
break;
196
default:
197
return;
198
}
199
200
tabs[newIndex].focus();
201
activateTab(tabs[newIndex]);
202
e.preventDefault();
203
});
204
```
205
206
## Debugging Tips
207
208
```javascript
209
// Log what screen reader sees
210
function logAccessibleName(element) {
211
const computed = window.getComputedStyle(element);
212
console.log({
213
role: element.getAttribute("role") || element.tagName,
214
name:
215
element.getAttribute("aria-label") ||
216
element.getAttribute("aria-labelledby") ||
217
element.textContent,
218
state: {
219
expanded: element.getAttribute("aria-expanded"),
220
selected: element.getAttribute("aria-selected"),
221
checked: element.getAttribute("aria-checked"),
222
disabled: element.disabled,
223
},
224
visible: computed.display !== "none" && computed.visibility !== "hidden",
225
});
226
}
227
```
228
229
## Best Practices
230
231
### Do's
232
233
- **Test with actual screen readers** - Not just simulators
234
- **Use semantic HTML first** - ARIA is supplemental
235
- **Test in browse and focus modes** - Different experiences
236
- **Verify focus management** - Especially for SPAs
237
- **Test keyboard only first** - Foundation for SR testing
238
239
### Don'ts
240
241
- **Don't assume one SR is enough** - Test multiple
242
- **Don't ignore mobile** - Growing user base
243
- **Don't test only happy path** - Test error states
244
- **Don't skip dynamic content** - Most common issues
245
- **Don't rely on visual testing** - Different experience
246

© Seth Hobson · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…