‹ 首页

accessibility-testing

@aj-geddes · 收录于 5 天前 · 上游提交 4 个月前

Test web applications for WCAG compliance and ensure usability for users with disabilities. Use for accessibility test, a11y, axe, ARIA, keyboard navigation, screen reader compatibility, and WCAG validation.

适合你,如果需要确保网站符合WCAG无障碍标准

/ 通过 npx 安装 校验哈希
npx oh-my-skill add aj-geddes/useful-ai-prompts/accessibility-testing
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- aj-geddes/useful-ai-prompts/accessibility-testing
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify aj-geddes/useful-ai-prompts/accessibility-testing
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
300GitHub stars
~595最小装载
~3.2K含声明引用
~3.4K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 3f5182c · 表述以原文为准
它做什么

当您请求进行网页无障碍测试时,Claude 能根据要求生成使用 axe-core 和 Playwright 的测试代码,检查 WCAG 合规性,并提供键盘导航、ARIA 等参考指南。

什么时候触发

当您提到“无障碍测试”、“a11y”、“WCAG”等关键词,或要求进行键盘导航、屏幕阅读器兼容性检查时触发。

装好后可以这样说
Claude 提供键盘导航测试示例。
Claude 给出 ARIA 测试参考。
技能原文 SKILL.md作者撰写 · MIT · 3f5182c

Accessibility Testing

Table of Contents
  • [Overview](#overview)
  • [When to Use](#when-to-use)
  • [Quick Start](#quick-start)
  • [Reference Guides](#reference-guides)
  • [Best Practices](#best-practices)
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](references/axe-core-with-playwright.md) | axe-core with Playwright | | [Keyboard Navigation Testing](references/keyboard-navigation-testing.md) | Keyboard Navigation Testing | | [ARIA Testing](references/aria-testing.md) | ARIA Testing | | [Jest with jest-axe](references/jest-with-jest-axe.md) | Jest with jest-axe | | [Cypress Accessibility Testing](references/cypress-accessibility-testing.md) | Cypress Accessibility Testing | | [Python with Selenium and axe](references/python-with-selenium-and-axe.md) | 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
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。