accessibility-patterns-advanced
Advanced accessibility patterns — screen reader testing (NVDA/VoiceOver/TalkBack checklists), automated testing (axe-core+Playwright, jest-axe, @axe-core/react dev warnings), and accessible component implementations (modal, table, form, data visualization).
Best use case
accessibility-patterns-advanced is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Advanced accessibility patterns — screen reader testing (NVDA/VoiceOver/TalkBack checklists), automated testing (axe-core+Playwright, jest-axe, @axe-core/react dev warnings), and accessible component implementations (modal, table, form, data visualization).
Teams using accessibility-patterns-advanced should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/accessibility-patterns-advanced/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How accessibility-patterns-advanced Compares
| Feature / Agent | accessibility-patterns-advanced | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Advanced accessibility patterns — screen reader testing (NVDA/VoiceOver/TalkBack checklists), automated testing (axe-core+Playwright, jest-axe, @axe-core/react dev warnings), and accessible component implementations (modal, table, form, data visualization).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Accessibility Patterns — Advanced
This skill extends `accessibility-patterns` with screen reader testing, automated testing, and accessible component patterns. Load `accessibility-patterns` first.
## When to Activate
- Running manual screen reader tests (NVDA, VoiceOver, TalkBack)
- Setting up automated a11y testing with axe-core or jest-axe
- Implementing accessible modal, table, form, or data visualization components
---
## Screen Reader Testing
### NVDA + Chrome (Windows)
```
Navigation shortcuts:
H / Shift+H — next/previous heading
F / Shift+F — next/previous form field
B / Shift+B — next/previous button
L / Shift+L — next/previous list
D / Shift+D — next/previous landmark
Tab — next interactive element
Enter/Space — activate button or link
Test checklist:
□ Turn on NVDA (Insert+Escape to toggle speech)
□ Navigate headings with H — is structure logical?
□ Tab through all interactive elements — are labels announced?
□ Submit a form with errors — are errors announced?
□ Open a modal — does focus move inside?
□ Close modal — does focus return to trigger?
```
### VoiceOver + Safari (macOS/iOS)
```
Navigation shortcuts (VO = Control+Option):
VO+U — Rotor (shows headings, links, landmarks)
VO+Right/Left — next/previous element
VO+Space — activate element
VO+Command+H — next heading
Tab — next interactive element
Test checklist:
□ Open Rotor (VO+U) — are headings and landmarks correct?
□ Navigate to form — are labels associated?
□ Check dynamic content — does VoiceOver announce changes?
□ Test custom widgets — are roles and states announced?
```
---
## Automated Testing
### axe-core + Playwright
```typescript
// playwright.config.ts
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test.describe('Accessibility', () => {
test('homepage has no critical violations', async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa'])
.exclude('.third-party-widget') // Exclude known third-party
.analyze();
// Filter to only serious/critical
const criticalViolations = results.violations.filter(
v => v.impact === 'critical' || v.impact === 'serious'
);
expect(criticalViolations).toEqual([]);
});
test('modal dialog is accessible', async ({ page }) => {
await page.goto('/dashboard');
await page.click('[data-testid="open-modal"]');
await page.waitForSelector('[role="dialog"]');
const results = await new AxeBuilder({ page })
.include('[role="dialog"]')
.analyze();
expect(results.violations).toEqual([]);
});
});
```
### jest-axe (Component Tests)
```typescript
import { render } from '@testing-library/react';
import { axe, toHaveNoViolations } from 'jest-axe';
expect.extend(toHaveNoViolations);
describe('Button component', () => {
it('is accessible', async () => {
const { container } = render(
<Button onClick={() => {}}>Save changes</Button>
);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
it('icon button has accessible label', async () => {
const { container } = render(
<IconButton aria-label="Close dialog" icon={<CloseIcon />} />
);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
});
```
### @axe-core/react (Dev-Mode Warnings)
```typescript
// index.tsx — dev-mode only
if (process.env.NODE_ENV !== 'production') {
import('@axe-core/react').then(({ default: axe }) => {
axe(React, ReactDOM, 1000); // Check every 1s, log to console
});
}
```
**Automation finds ~30% of real issues.** Always supplement with manual keyboard and screen reader testing.
---
## Accessible Component Patterns
### Accessible Modal
```tsx
interface ModalProps {
isOpen: boolean;
onClose: () => void;
title: string;
children: ReactNode;
}
function Modal({ isOpen, onClose, title, children }: ModalProps) {
const containerRef = useRef<HTMLDivElement>(null);
useFocusTrap(isOpen, containerRef);
if (!isOpen) return null;
return (
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
ref={containerRef}
className="modal"
>
<h2 id="modal-title">{title}</h2>
{children}
<button onClick={onClose} aria-label={`Close ${title}`}>
✕
</button>
</div>
);
}
```
### Accessible Table
```html
<table>
<caption>Monthly sales by region</caption>
<thead>
<tr>
<th scope="col">Region</th>
<th scope="col">Q1</th>
<th scope="col">Q2</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">North America</th>
<td>$1.2M</td>
<td>$1.5M</td>
</tr>
</tbody>
</table>
```
### Accessible Form
```html
<form novalidate>
<div class="form-field">
<label for="email">Email address <span aria-hidden="true">*</span></label>
<input
id="email"
type="email"
autocomplete="email"
aria-required="true"
aria-invalid="true"
aria-describedby="email-error"
/>
<p id="email-error" role="alert" class="error">
Please enter a valid email address.
</p>
</div>
</form>
```
### Accessible Data Visualization
```tsx
// Every chart needs a text alternative
function SalesChart({ data }: { data: SalesData[] }) {
return (
<figure>
<figcaption>Monthly sales 2026 — peaks in Q2 and Q4</figcaption>
{/* Visual chart for sighted users */}
<canvas aria-hidden="true" ref={chartRef} />
{/* Text table for screen reader users */}
<table className="sr-only">
<caption>Monthly sales data 2026</caption>
<thead>
<tr><th>Month</th><th>Sales</th></tr>
</thead>
<tbody>
{data.map(d => (
<tr key={d.month}>
<td>{d.month}</td>
<td>{formatCurrency(d.sales)}</td>
</tr>
))}
</tbody>
</table>
</figure>
);
}
```
---
## Reference
- `accessibility-patterns` — WCAG criteria, ARIA patterns, keyboard navigation, focus trap, skip links
- `storybook-patterns` — addon-a11y for story-level accessibility checks
- `e2e-testing` — Playwright E2E tests (add axe checks to critical flows)Related Skills
zero-trust-patterns
Zero-Trust security patterns — mTLS between microservices (Istio/SPIFFE), SPIRE workload identity, OPA/Envoy authorization, NetworkPolicy default-deny-all, short-lived credentials, service mesh security, and Kubernetes RBAC hardening.
webrtc-patterns
WebRTC patterns — peer connection setup, ICE/STUN/TURN configuration, signaling server design, SFU vs mesh topology, screen sharing, media track management, and reconnect/ICE restart handling.
webhook-patterns
Webhook patterns for receiving, verifying (HMAC), and idempotently processing third-party events. Covers Stripe, GitHub, and generic webhook patterns, delivery guarantees, retry handling, and testing.
wasm-patterns
WebAssembly patterns: wasm-pack, wasm-bindgen (JS↔Wasm interop), WASI, Component Model, wasm-opt, Rust-to-WASM compilation, JS integration (web workers, streaming instantiation), and production deployment (CDN, Content-Type headers).
ux-micro-patterns
UX micro-patterns for every product state: Empty States, Loading States (skeleton screens, spinners, optimistic UI), Error States, Success States, Confirmation Dialogs, Onboarding Flows, and Progressive Disclosure. These patterns apply to every feature — done wrong, they're the biggest source of user confusion.
typescript-patterns
TypeScript patterns — type system best practices, strict mode, utility types, generics, discriminated unions, error handling with Result types, and module organization. Core patterns for production TypeScript.
typescript-patterns-advanced
Advanced TypeScript — mapped types, template literal types, conditional types, infer, type guards, decorators, async patterns, testing with Vitest/Jest, and performance. Extends typescript-patterns.
typescript-monorepo-patterns
TypeScript monorepo patterns with Turborepo + pnpm workspaces. Covers package structure, shared configs, task pipeline caching, build orchestration, and publishing strategy.
terraform-patterns
Infrastructure as Code with Terraform — project structure, remote state, modules, workspace strategy, AWS/GCP patterns, CI/CD integration, and security hardening. The standard for managing production infrastructure.
tdd-workflow-advanced
TDD anti-patterns — writing code before tests, testing implementation details instead of behavior, using waitForTimeout as a sync strategy, chaining tests that share state, mocking the system under test instead of its dependencies.
swiftui-patterns
SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.
swift-patterns
Core Swift patterns — value vs reference types, protocols, generics, optionals, Result, error handling, Codable, and module organization. Foundation for all Swift development.