mcpField
A
accessibility-testing

accessibility-testing

github.com/aj-geddesTesting & quality374577 installsUpdated 34w ago
Repository

About accessibility-testing

A skill for testing web application accessibility, aimed at developers validating WCAG compliance and usability with assistive technologies. It combines automated testing examples with guidance for keyboard, screen reader, and manual checks.

Key features

  1. 01Playwright and axe-core examples
  2. 02Keyboard navigation testing
  3. 03Screen reader compatibility checks
  4. 04ARIA and form accessibility checks
  5. 05Guides for Jest, Cypress, and Selenium

Use cases

  1. 01Checking WCAG 2.1/2.2 compliance
  2. 02Finding keyboard navigation barriers
  3. 03Reviewing contrast and ARIA attributes
  4. 04Adding automated checks to CI

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill accessibility-testing

After installing, type/accessibility-testingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
aria-testing.md
axe-core-with-playwright.md
cypress-accessibility-testing.md
jest-with-jest-axe.md
keyboard-navigation-testing.md
python-with-selenium-and-axe.md
scripts/
scaffold-tests.sh
templates/
test-template.js

Details

From the project README

Accessibility Testing

Table of Contents

Overview

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.

When to Use

  • Validating WCAG 2.1/2.2 compliance
  • Testing keyboard navigation
  • Verifying screen reader compatibility
  • Testing color contrast ratios
  • Validating ARIA attributes
  • Testing form accessibility
  • Ensuring focus management
  • Testing with assistive technologies

Quick Start

Minimal working example:

// tests/accessibility/homepage.a11y.test.ts
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";

test.describe("Homepage Accessibility", () => {
  test("should not have any automatically detectable WCAG A or AA violations", async ({
    page,
  }) => {
    await page.goto("/");

    const accessibilityScanResults = await new AxeBuilder({ page })
      .withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"])
      .analyze();

    expect(accessibilityScanResults.violations).toEqual([]);
  });

  test("navigation should be accessible", async ({ page }) => {
    await page.goto("/");

    const results = await new AxeBuilder({ page }).include("nav").analyze();

    expect(results.violations).toEqual([]);
  });

// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
axe-core with Playwrightaxe-core with Playwright
Keyboard Navigation TestingKeyboard Navigation Testing
ARIA TestingARIA Testing
Jest with jest-axeJest with jest-axe
Cypress Accessibility TestingCypress Accessibility Testing
Python with Selenium and axePython with Selenium and axe

Best Practices

✅ DO
  • Test with real assistive technologies
  • Include keyboard-only users
  • Test color contrast
  • Use semantic HTML
  • Provide text alternatives
  • Test with screen readers
  • Run automated tests in CI
  • Follow WCAG 2.1 AA standards
❌ DON'T
  • Rely only on automated tests (they catch ~30-40% of issues)
  • Use color alone to convey information
  • Skip keyboard navigation testing
  • Forget focus management in dynamic content
  • Use div/span for interactive elements
  • Hide focusable content with display:none
  • Ignore ARIA best practices
  • Skip manual testing

Comments

Markdown supported