Back to Skills

accessibility-testing

proffesor-for-testing
Updated Today
36 views
99
21
99
View on GitHub
Otheraccessibilitywcaga11yscreen-readeradasection-508inclusive

About

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.

Documentation

Accessibility Testing

<default_to_action> When testing accessibility or ensuring compliance:

  1. APPLY POUR principles: Perceivable, Operable, Understandable, Robust
  2. TEST with keyboard-only navigation (Tab, Enter, Escape)
  3. VALIDATE with screen readers (VoiceOver, NVDA, JAWS)
  4. CHECK color contrast (4.5:1 for text, 3:1 for large text)
  5. 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

LevelRequirementTarget
ABasic accessibilityMinimum legal
AAStandard (most orgs)Industry standard
AAAEnhancedSpecialized sites

POUR Principles

PrincipleMeaningKey Tests
PerceivableCan perceive contentAlt text, contrast, captions
OperableCan operate UIKeyboard, no seizures, navigation
UnderstandableCan understandClear labels, predictable, errors
RobustWorks with assistive techValid HTML, ARIA

Color Contrast Requirements

ContentAA RatioAAA Ratio
Normal text4.5:17:1
Large text (18pt+)3:14.5:1
UI components3: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


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.

Quick Install

/plugin add https://github.com/proffesor-for-testing/agentic-qe/tree/main/accessibility-testing

Copy and paste this command in Claude Code to install this skill

GitHub 仓库

proffesor-for-testing/agentic-qe
Path: .claude/skills/accessibility-testing
agenticqeagenticsfoundationagentsquality-engineering

Related Skills

moai-design-systems

Design

This skill helps developers implement production-ready design systems using W3C DTCG 2025.10 token architecture and WCAG 2.2 accessibility standards. It provides guidance for creating accessible component libraries, automating Figma-to-code workflows, and ensuring color contrast compliance. Use it when setting up design token architecture or building maintainable, accessible UI systems.

View skill

design-system-starter

Meta

This Claude skill helps developers create or evolve design systems by providing design token structures, component architecture patterns, and accessibility guidelines. It is designed for establishing consistent, scalable, and accessible UI design across products. Use it when starting a new design system or refactoring an existing one.

View skill

moai-design-systems

Design

This Claude Skill helps developers implement production-ready design systems using W3C DTCG 2025.10 token standards and WCAG 2.2 accessibility compliance. It provides guidance for setting up design token architecture, building accessible component libraries, and automating design-to-code workflows with Figma MCP. Use it when establishing multi-platform design systems that require maintainable, accessible UI development.

View skill

test-environment-management

Other

This Claude Skill manages test infrastructure using infrastructure as code, Docker/Kubernetes for consistent environments, and service virtualization. It helps developers ensure environment parity with production and optimize testing costs through auto-shutdown and spot instances. Use it when provisioning test environments or managing testing infrastructure.

View skill