accessibility-testing
关于
This skill performs automated accessibility testing for WCAG 2.2 compliance, including screen reader validation and inclusive design checks. Use it to ensure legal standards (ADA, Section 508) are met and to build applications accessible to disabled users. It applies POUR principles, tests keyboard navigation, validates with screen readers, and checks color contrast.
快速安装
Claude Code
推荐/plugin add https://github.com/proffesor-for-testing/agentic-qegit clone https://github.com/proffesor-for-testing/agentic-qe.git ~/.claude/skills/accessibility-testing在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Accessibility Testing
<default_to_action> When testing accessibility or ensuring compliance:
- APPLY POUR principles: Perceivable, Operable, Understandable, Robust
- TEST with keyboard-only navigation (Tab, Enter, Escape)
- VALIDATE with screen readers (VoiceOver, NVDA, JAWS)
- CHECK color contrast (4.5:1 for text, 3:1 for large text)
- AUTOMATE with axe-core, integrate in CI/CD pipeline
Quick A11y Checklist:
- All images have alt text (or alt="" for decorative)
- All form fields have labels
- Color is never the only indicator
- Focus visible on all interactive elements
- Keyboard navigation works throughout
Critical Success Factors:
- Automated testing catches 30-50% of issues
- Manual testing with real assistive tech required
- Include users with disabilities in testing </default_to_action>
Quick Reference Card
When to Use
- Legal compliance (ADA, Section 508, EU Directive)
- New feature development
- Before release validation
- Accessibility audits
WCAG 2.2 Levels
| Level | Requirement | Target |
|---|---|---|
| A | Basic accessibility | Minimum legal |
| AA | Standard (most orgs) | Industry standard |
| AAA | Enhanced | Specialized sites |
POUR Principles
| Principle | Meaning | Key Tests |
|---|---|---|
| Perceivable | Can perceive content | Alt text, contrast, captions |
| Operable | Can operate UI | Keyboard, no seizures, navigation |
| Understandable | Can understand | Clear labels, predictable, errors |
| Robust | Works with assistive tech | Valid HTML, ARIA |
Color Contrast Requirements
| Content | AA Ratio | AAA Ratio |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text (18pt+) | 3:1 | 4.5:1 |
| UI components | 3:1 | - |
Keyboard Navigation Testing
// Test all interactive elements reachable via keyboard
test('all interactive elements keyboard accessible', async ({ page }) => {
await page.goto('/');
const focusableElements = await page.$$('button, a, input, select, textarea, [tabindex]');
for (const element of focusableElements) {
await element.focus();
const isFocused = await element.evaluate(el => document.activeElement === el);
expect(isFocused).toBe(true);
}
});
// Verify visible focus indicator
test('focus indicator visible', async ({ page }) => {
await page.goto('/');
await page.keyboard.press('Tab');
const focusedElement = await page.locator(':focus');
const outline = await focusedElement.evaluate(el =>
getComputedStyle(el).outline
);
expect(outline).not.toBe('none');
});
Automated Testing with axe-core
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('page has no accessibility violations', async ({ page }) => {
await page.goto('/');
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag22aa'])
.analyze();
expect(results.violations).toEqual([]);
});
// CI/CD integration
test('checkout flow accessible', async ({ page }) => {
await page.goto('/checkout');
const results = await new AxeBuilder({ page })
.include('#checkout-form')
.disableRules(['color-contrast']) // Fix in next sprint
.analyze();
expect(results.violations.filter(v =>
v.impact === 'critical' || v.impact === 'serious'
)).toHaveLength(0);
});
Screen Reader Testing Checklist
## VoiceOver (macOS) Testing
- [ ] Page title announced on load
- [ ] Headings hierarchy correct (h1 → h2 → h3)
- [ ] Landmarks present (nav, main, footer)
- [ ] Images have descriptive alt text
- [ ] Form labels read correctly
- [ ] Error messages announced
- [ ] Dynamic content updates announced (aria-live)
Agent-Driven Accessibility
// Comprehensive a11y validation
await Task("Accessibility Validation", {
url: 'https://example.com/checkout',
standard: 'WCAG2.2',
level: 'AA',
checks: ['keyboard', 'screen-reader', 'color-contrast'],
includeScreenReaderSimulation: true
}, "qe-visual-tester");
// Fleet coordination for comprehensive testing
const a11yFleet = await FleetManager.coordinate({
strategy: 'comprehensive-accessibility',
agents: [
'qe-visual-tester', // Visual & keyboard checks
'qe-test-generator', // Generate a11y tests
'qe-quality-gate' // Enforce compliance
],
topology: 'parallel'
});
Agent Coordination Hints
Memory Namespace
aqe/accessibility/
├── wcag-results/* - WCAG audit results
├── screen-reader/* - Screen reader test logs
├── remediation/* - Fix recommendations
└── compliance/* - Compliance reports
Fleet Coordination
const a11yFleet = await FleetManager.coordinate({
strategy: 'accessibility-testing',
agents: [
'qe-visual-tester', // axe-core, keyboard, focus
'qe-test-generator', // Generate a11y test cases
'qe-quality-gate' // Block non-compliant builds
],
topology: 'parallel'
});
Related Skills
- visual-testing-advanced - Visual a11y checks
- mobile-testing - Mobile a11y (VoiceOver, TalkBack)
- compliance-testing - Legal compliance
Remember
1 billion people have disabilities. Inaccessible software excludes 15% of humanity. Legal requirements: ADA, Section 508, EU Directive 2016/2102. $13T purchasing power. 250%+ increase in lawsuits.
Automated testing catches only 30-50% of issues. Combine with manual keyboard testing, screen reader testing, and real user testing with people with disabilities.
With Agents: Agents automate WCAG 2.2 compliance checking, screen reader simulation, and focus management validation. Use agents to enforce accessibility standards in CI/CD and catch violations before production.
GitHub 仓库
相关推荐技能
moai-design-systems
设计这个Claude Skill帮助开发者基于W3C DTCG 2025.10标准构建设计系统,实现WCAG 2.2无障碍合规和Figma MCP自动化工作流。它适用于创建多平台设计令牌架构、开发可访问组件库以及自动化设计到代码的转换流程。通过集成最新标准,确保UI开发的一致性和可访问性。
moai-design-systems
设计该Skill帮助开发者基于W3C DTCG 2025.10标准构建设计系统,实现WCAG 2.2无障碍合规。它提供Figma MCP工作流来自动化设计到代码的转换,确保多平台项目中的设计令牌架构和组件库保持一致性与可访问性。
design-system-starter
元该Skill为开发者提供创建和演进设计系统的全面指导,包含设计令牌结构、组件架构模式和可访问性指南。适用于从零搭建新系统或优化现有系统,确保UI设计的一致性和可扩展性。通过标准化模板和最佳实践,帮助团队快速构建符合WCAG标准的用户界面。
regression-testing
其他该Skill提供智能化的回归测试策略,帮助开发者在验证代码修复时确保现有功能不被破坏。它通过变更影响分析和风险评估,智能选择测试用例并优化执行顺序,避免全量测试的时间消耗。适用于CI/CD流程中的测试套件规划、变更验证和快速反馈场景,能显著提升回归测试效率。
