accessibility-testing

aj-geddes/useful-ai-prompts · updated Apr 8, 2026

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

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.

skill.md

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:

Guide Contents
axe-core with Playwright axe-core with Playwright
Keyboard Navigation Testing Keyboard Navigation Testing
ARIA Testing ARIA Testing
Jest with jest-axe Jest with jest-axe
Cypress Accessibility Testing Cypress Accessibility Testing
Python with Selenium and axe Python 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

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.731 reviews
  • Ganesh Mohane· Dec 28, 2024

    accessibility-testing reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Sofia Zhang· Dec 24, 2024

    Registry listing for accessibility-testing matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Evelyn Khan· Dec 20, 2024

    accessibility-testing reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Rahul Santra· Nov 19, 2024

    I recommend accessibility-testing for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Mei Ghosh· Nov 15, 2024

    Useful defaults in accessibility-testing — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Yuki Mehta· Nov 11, 2024

    I recommend accessibility-testing for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Pratham Ware· Oct 10, 2024

    Useful defaults in accessibility-testing — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Hana Jain· Oct 6, 2024

    I recommend accessibility-testing for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Noor Smith· Oct 2, 2024

    Useful defaults in accessibility-testing — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Naina Mehta· Sep 25, 2024

    accessibility-testing fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 31

1 / 4