Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计通过

a11y-testinga11y 测试

Agent Skill

用于辅助无障碍访问检查、页面可用性审计和前端可访问性改进。它适合让 Agent 检查语义标签、键盘操作、颜色对比、ARIA 属性和自动化检测结果。使用时需要结合真实页面和浏览器验证,不应只依赖静态文本判断;涉及修复建议时,应兼顾设计系统、组件复用和 WCAG 等通用无障碍规范。

总安装

2,097

周安装

84

GitHub Stars

323

下载量

679
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:a11y-testing(a11y 测试)
来源仓库:https://github.com/pedronauck/skills
仓库路径:skills/a11y-testing
安装命令:
npx skills add https://github.com/pedronauck/skills --skill a11y-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pedronauck/skills --skill a11y-testing

简介

用于辅助无障碍访问检查、页面可用性审计和前端可访问性改进,适合检查语义标签、键盘操作和 ARIA 属性。

  • 使用时需要结合真实页面和浏览器验证,不应只依赖静态文本判断。
  • 涉及修复建议时,应兼顾设计系统、组件复用和 WCAG 等通用无障碍规范。
  • 安装方式:通过 npx skills add 命令从指定 GitHub 仓库添加。
  • a11y-testing 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Accessibility Testing

Automated accessibility testing with axe-core for WCAG 2.2 compliance. Catches 30-50% of issues automatically.

Overview

  • Implementing CI/CD accessibility gates
  • Running pre-release compliance audits
  • Testing component accessibility in unit tests
  • Validating page-level accessibility with E2E tests
  • Ensuring keyboard navigation works correctly

Quick Reference

jest-axe Unit Testing

// jest.setup.ts
import { toHaveNoViolations } from 'jest-axe';
expect.extend(toHaveNoViolations);

// Button.test.tsx
import { render } from '@testing-library/react';
import { axe } from 'jest-axe';

it('has no a11y violations', async () => {
  const { container } = render(<Button>Click me</Button>);
  expect(await axe(container)).toHaveNoViolations();
});

Playwright + axe-core E2E

// e2e/accessibility.spec.ts
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";

test("page has no a11y violations", async ({ page }) => {
  await page.goto("/");
  const results = await new AxeBuilder({ page })
    .withTags(["wcag2a", "wcag2aa", "wcag22aa"])
    .analyze();
  expect(results.violations).toEqual([]);
});

test("modal state has no violations", async ({ page }) => {
  await page.goto("/");
  await page.click('[data-testid="open-modal"]');
  await page.waitForSelector('[role="dialog"]');

  const results = await new AxeBuilder({ page })
    .include('[role="dialog"]')
    .withTags(["wcag2a", "wcag2aa"])
    .analyze();
  expect(results.violations).toEqual([]);
});

CI/CD Integration

# .github/workflows/accessibility.yml
name: Accessibility
on: [pull_request]

jobs:
  a11y:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: "20", cache: "npm" }
      - run: npm ci
      - run: npm run test:a11y
      - run: npm run build
      - run: npx playwright install --with-deps chromium
      - run: npm start & npx wait-on http://localhost:3000
      - run: npx playwright test e2e/accessibility

Key Decisions

DecisionChoiceRationale
Test runnerjest-axe + PlaywrightUnit + E2E coverage
WCAG levelAA (wcag2aa)Industry standard, legal compliance
CI gateBlock on violationsPrevent regression
Browser matrixChromium + FirefoxCross-browser coverage
ExclusionsThird-party widgets onlyMinimize blind spots
Tagswcag2a, wcag2aa, wcag22aaFull WCAG 2.2 AA
State testingTest all interactive statesModal, error, loading

Anti-Patterns (FORBIDDEN)

// BAD: Disabling rules globally
const results = await axe(container, {
  rules: { 'color-contrast': { enabled: false } }  // NEVER disable rules
});

// BAD: Excluding too much
new AxeBuilder({ page })
  .exclude('body')  // Defeats the purpose
  .analyze();

// BAD: Only testing happy path
it('form is accessible', async () => {
  const { container } = render(<Form />);
  expect(await axe(container)).toHaveNoViolations();
  // Missing: error state, loading state, disabled state
});

// BAD: No CI enforcement
// Accessibility tests exist but don't block PRs

// BAD: Manual-only testing
// Relying solely on human review - catches issues too late

Related Skills

  • e2e-testing - Playwright E2E testing patterns
  • unit-testing - Jest unit testing fundamentals
  • design-system-starter - Accessible component foundations

Capability Details

jest-axe-testing

Keywords: jest, axe, unit test, component test, react-testing-library Solves:

  • Component-level accessibility validation
  • Fast feedback in development
  • CI/CD unit test gates
  • Testing all component states (disabled, error, loading)

playwright-axe-testing

Keywords: playwright, e2e, axe-core, page scan, wcag, integration Solves:

  • Full page accessibility audits
  • Testing interactive states (modals, menus, forms)
  • Multi-browser accessibility verification
  • WCAG compliance validation at page level

ci-a11y-gates

Keywords: ci, cd, github actions, accessibility gate, automation Solves:

  • Blocking PRs with accessibility violations
  • Automated regression prevention
  • Compliance reporting and artifacts
  • Integration with deployment pipelines

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.69%
按下载量换算242

Claude

31.67%
按下载量换算215

Cursor

19.31%
按下载量换算131

Gemini CLI

9.65%
按下载量换算66

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills