Token导航 LogoToken导航

Agent Skill · 研究检索

accessibility-testing(可访问性测试)

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

accessibility-testing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 63,093。

总安装 321周安装 13GitHub Stars 4下载 101核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/petrkindlmann/qa-skills --skill accessibility-testing

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助无障碍访问检查与前端可访问性改进,适合 WCAG 规范落地。可帮助检查语义标签、键盘操作、颜色对比与 ARIA 属性。通过 GitHub 安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主环境。需结合真实页面与浏览器验证,避免仅依赖静态文本判断;修复建议应兼顾设计系统与通用规范。

accessibility-testing 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/accessibility-testing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/petrkindlmann/qa-skills --skill accessibility-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

accessibility-testing 怎么安装?

在终端执行 npx skills add https://github.com/petrkindlmann/qa-skills --skill accessibility-testing。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

accessibility-testing 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

accessibility-testing 需要什么权限?

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

accessibility-testing 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

accessibility-testing 用的人多吗?

公开数据是累计安装 321 次,近一周安装 13 次,下载 101 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

accessibility-testing 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
accessibility-testing

可访问性测试 · 本页

3214操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文


Discovery Questions

Before designing an accessibility testing strategy, understand the requirements and current state. Check .agents/qa-project-context.md first -- if it exists, use it as the foundation and skip questions already answered there.

Requirements and Compliance

  • What WCAG conformance level is required? (A, AA, or AAA)
  • What legal requirements apply? (ADA, EAA/EN 301 549, Section 508, AODA)
  • Are there contractual accessibility requirements from customers? (common in enterprise/government)
  • Is there a Voluntary Product Accessibility Template (VPAT) to maintain?

Current State

  • Has an accessibility audit been performed before? What were the findings?
  • Are there known accessibility issues in the backlog?
  • Does the design system include accessibility guidelines?

Testing Infrastructure

  • Is automated accessibility testing integrated into CI?
  • Which screen readers does the team test with? (VoiceOver, NVDA, JAWS, TalkBack)
  • What browsers and devices must be accessible?

Core Principles

1. Automated Testing Catches 30-40% of Issues

Tools like axe-core can detect missing alt text, insufficient color contrast, missing form labels, and invalid ARIA attributes. They cannot detect whether alt text is meaningful, whether the tab order is logical, whether a custom widget is operable by keyboard, or whether the reading order makes sense. Both automated and manual testing are essential.

2. Semantic HTML First, ARIA as Last Resort

Native HTML elements (<button>, <nav>, <input>, <table>, <dialog>) carry built-in accessibility semantics, keyboard behavior, and screen reader support. Adding role="button" to a <div> requires also adding tabindex, keydown handlers for Enter and Space, focus styles, and ARIA states. Use the native element. Reach for ARIA only when no native element exists for the pattern.

3. Test in Order: Keyboard, Screen Reader, Automated

Keyboard testing catches the most impactful issues (users physically blocked from features). Screen reader testing catches semantics issues (users confused by incorrect announcements). Automated testing catches the remaining mechanical issues (missing attributes, contrast ratios). Start with the highest-impact method.

4. Accessibility Is Not a Feature -- It Is a Quality Attribute

Accessibility is tested continuously, like performance or security. Every new component, every new page, every PR gets accessibility review. Retrofitting accessibility onto a finished product costs 10-100x more than building it in from the start.

5. Test With Real Assistive Technology

Browser DevTools and axe-core extensions are useful for development, but they are not substitutes for testing with actual screen readers. VoiceOver on macOS, NVDA on Windows, and TalkBack on Android each have different behaviors and quirks.


Automated Testing with axe-core and Playwright

Setup

npm install --save-dev @axe-core/playwright

Reusable Helper

// e2e/helpers/a11y.ts
import { type Page, type TestInfo, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';

interface A11yOptions {
  tags?: string[];
  exclude?: string[];
  disableRules?: string[];
}

export async function checkAccessibility(
  page: Page, testInfo: TestInfo, options: A11yOptions = {}
): Promise<void> {
  let builder = new AxeBuilder({ page })
    .withTags(options.tags ?? ['wcag2a', 'wcag2aa', 'wcag22aa']);

  for (const sel of options.exclude ?? []) builder = builder.exclude(sel);
  if (options.disableRules?.length) builder = builder.disableRules(options.disableRules);

  const results = await builder.analyze();

  await testInfo.attach('a11y-results', {
    body: JSON.stringify(results, null, 2), contentType: 'application/json',
  });

  const violations = results.violations.map((v) => ({
    rule: v.id, impact: v.impact, description: v.description,
    helpUrl: v.helpUrl, elements: v.nodes.map((n) => n.html).slice(0, 5),
  }));

  expect(violations, `${violations.length} a11y violations:\n${JSON.stringify(violations, null, 2)}`)
    .toHaveLength(0);
}

Using in Tests

// e2e/tests/a11y/pages.spec.ts
import { test, expect } from '@playwright/test';
import { checkAccessibility } from '../../helpers/a11y';

test.describe('Accessibility - public pages', () => {
  for (const { name, path } of [
    { name: 'Home', path: '/' }, { name: 'Login', path: '/login' },
    { name: 'Pricing', path: '/pricing' }, { name: 'Sign Up', path: '/signup' },
  ]) {
    test(`${name} page has no a11y violations`, async ({ page }, testInfo) => {
      await page.goto(path);
      await checkAccessibility(page, testInfo);
    });
  }
});

test.describe('Accessibility - interactive states', () => {
  test('modal dialog is accessible when open', async ({ page }, testInfo) => {
    await page.goto('/dashboard');
    await page.getByRole('button', { name: 'Create project' }).click();
    await expect(page.getByRole('dialog')).toBeVisible();
    await checkAccessibility(page, testInfo);
  });
});

Rule Suppression

Suppress rules only with documented justification:

await checkAccessibility(page, testInfo, {
  disableRules: ['frame-title'], // Third-party chat widget; tracked in PROJ-4521
  exclude: ['#third-party-analytics-widget'],
});

CI Integration

# .github/workflows/a11y.yml
name: Accessibility Tests
on:
  push: { branches: [main] }
  pull_request: { branches: [main] }
jobs:
  a11y:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20, cache: npm }
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: npm run build && npm start &
      - run: npx wait-on http://localhost:3000 --timeout 60000
      - run: npx playwright test e2e/tests/a11y/
      - uses: actions/upload-artifact@v4
        if: ${{ !cancelled() }}
        with: { name: a11y-report, path: 'test-results/\nplaywright-report/', retention-days: 14 }

Manual Testing Checklist

Keyboard Navigation Audit

  • Tab order is logical: Left-to-right, top-to-bottom for LTR languages. No unexpected focus jumps.
  • All interactive elements are reachable via Tab/Shift+Tab.
  • Focus indicator is visible on every focused element. No outline: none without a replacement.
  • Skip link works: First Tab reveals "Skip to main content" link.
  • Enter activates buttons and links. Space activates buttons and toggles checkboxes.
  • Escape closes modals, dropdowns, tooltips. Focus returns to trigger element.
  • Arrow keys navigate within tab panels, menus, radio groups, and tree views.
  • No keyboard traps (exception: modal dialogs intentionally trap focus until dismissed).
  • Custom widgets are operable without a mouse (sliders, date pickers, drag-and-drop).
// e2e/tests/a11y/keyboard.spec.ts
import { test, expect } from '@playwright/test';

test('skip link moves focus to main content', async ({ page }) => {
  await page.goto('/');
  await page.keyboard.press('Tab');
  const skipLink = page.getByRole('link', { name: /skip to (main )?content/i });
  await expect(skipLink).toBeFocused();
  await page.keyboard.press('Enter');
  await expect(page.getByRole('main')).toBeFocused();
});

test('modal traps focus and returns it on close', async ({ page }) => {
  await page.goto('/dashboard');
  const trigger = page.getByRole('button', { name: 'Create project' });
  await trigger.click();
  const dialog = page.getByRole('dialog');
  await expect(dialog).toBeVisible();

  // Escape closes and returns focus to trigger
  await page.keyboard.press('Escape');
  await expect(dialog).toBeHidden();
  await expect(trigger).toBeFocused();
});

test('form can be completed entirely by keyboard', async ({ page }) => {
  await page.goto('/signup');
  await page.keyboard.press('Tab');
  await page.keyboard.type('Jane Doe');
  await page.keyboard.press('Tab');
  await page.keyboard.type('jane@example.com');
  await page.keyboard.press('Tab');
  await page.keyboard.type('SecureP@ss123');
  await page.keyboard.press('Tab');
  await page.keyboard.press('Space'); // Toggle checkbox
  await expect(page.getByRole('checkbox', { name: /terms/i })).toBeChecked();
  await page.keyboard.press('Tab');
  await page.keyboard.press('Enter'); // Submit
  await expect(page).toHaveURL(/\/welcome/);
});

Screen Reader Testing

Screen ReaderOSBrowserFree?
VoiceOvermacOS/iOSSafariYes (Cmd+F5)
NVDAWindowsFirefox/ChromeYes
JAWSWindowsChrome/EdgeNo
TalkBackAndroidChromeYes

Checklist:

  • Page title announced on navigation
  • Headings create a navigable outline (h1 -> h2 -> h3, no skipped levels)
  • Images have descriptive alt text (or alt="" for decorative images)
  • Form inputs announce their labels when focused
  • Required fields announced as required; errors associated with inputs
  • Live regions announce dynamic content (toasts, loading states)
  • Buttons and links announce their purpose (no "click here")

Color Contrast and Visual

  • Normal text: 4.5:1 contrast ratio minimum (WCAG AA)
  • Large text (18pt+ or 14pt+ bold): 3:1 minimum
  • UI components: 3:1 against adjacent colors
  • Information not conveyed by color alone (add icons, patterns, or text)

Form and Error Accessibility

  • Every input has a visible <label> associated via for/id
  • Required fields indicated visually and programmatically (required or aria-required)
  • Errors use aria-describedby to associate with inputs and role="alert" for announcement
  • Focus moves to first error on form submission failure
  • Form groups use <fieldset> and <legend>

WCAG 2.2 Quick Reference

Level A (Must Fix)

CriterionWhat It MeansCommon Failure
1.1.1 Non-text ContentImages have alt text<img> without alt attribute
1.3.1 Info and RelationshipsStructure via HTML semantics<div> styled as heading instead of <h2>
2.1.1 KeyboardAll functionality via keyboardCustom widget only responds to mouse
2.4.1 Bypass BlocksSkip navigation linkNo skip link
3.1.1 Language of Page<html lang="en"> setMissing lang attribute
3.3.1 Error IdentificationErrors described in textError indicated only by red border
4.1.2 Name, Role, ValueCustom controls expose name/role<div onclick> with no role

Level AA (Most Common Legal Requirement)

CriterionWhat It MeansCommon Failure
1.4.3 Contrast (Minimum)4.5:1 normal text, 3:1 largeLight gray on white
1.4.4 Resize TextScales to 200% without lossFixed-height containers clip text
1.4.11 Non-text ContrastUI components 3:1 ratioLow-contrast input borders
2.4.7 Focus VisibleKeyboard focus visibleoutline: none without replacement
2.5.8 Target SizeTouch targets 24x24px minimumTiny icon buttons
3.3.2 Labels or InstructionsInputs have labelsPlaceholder as only label
3.3.8 Accessible AuthNo cognitive function testCAPTCHA with no alternative

Level AAA (Nice to Have)

CriterionWhat It Means
1.4.6 Contrast (Enhanced)7:1 normal text, 4.5:1 large
2.4.9 Link Purpose (Link Only)Link text alone describes destination
3.1.5 Reading LevelLower secondary education level

Accessible Patterns with Code

Accessible Forms

test('form displays accessible error messages', async ({ page }) => {
  await page.goto('/contact');
  await page.getByRole('button', { name: 'Send message' }).click();

  const emailInput = page.getByLabel('Email address');
  const emailError = page.getByText('Email is required');
  await expect(emailError).toBeVisible();

  // Verify aria-describedby links input to error
  const errorId = await emailError.getAttribute('id');
  expect(await emailInput.getAttribute('aria-describedby')).toContain(errorId);
  await expect(emailInput).toHaveAttribute('aria-invalid', 'true');
  await expect(emailInput).toBeFocused();
});

Expected HTML: <label for="email">Email</label> + <input id="email" aria-required="true" aria-invalid="true" aria-describedby="email-error"> + <p id="email-error" role="alert">Email is required</p>

Modal/Dialog Accessibility

test('dialog follows ARIA dialog pattern', async ({ page }) => {
  await page.goto('/dashboard');
  const trigger = page.getByRole('button', { name: 'Delete project' });
  await trigger.click();

  const dialog = page.getByRole('dialog');
  await expect(dialog).toBeVisible();
  await expect(dialog).toHaveAttribute('aria-labelledby');
  await expect(dialog).toHaveAttribute('aria-modal', 'true');
  await expect(dialog.locator(':focus')).toBeVisible(); // Focus inside dialog

  await page.keyboard.press('Escape');
  await expect(dialog).toBeHidden();
  await expect(trigger).toBeFocused(); // Focus returns to trigger
});

Dynamic Content -- Live Regions

test('toast notifications are announced', async ({ page }) => {
  await page.goto('/settings');
  const toastRegion = page.locator('[aria-live="polite"]');
  await expect(toastRegion).toBeAttached();

  await page.getByRole('button', { name: 'Save changes' }).click();
  await expect(toastRegion.getByText('Settings saved')).toBeVisible();
});

Data Tables

test('table has proper headers and sort state', async ({ page }) => {
  await page.goto('/users');
  const table = page.getByRole('table', { name: 'User accounts' });
  await expect(table.getByRole('columnheader')).toHaveCount(5);

  const nameHeader = page.getByRole('columnheader', { name: 'Name' });
  await nameHeader.click();
  await expect(nameHeader).toHaveAttribute('aria-sort', 'ascending');
});

Navigation Landmarks

test('page has required landmarks', async ({ page }) => {
  await page.goto('/dashboard');
  await expect(page.getByRole('banner')).toBeVisible();      // <header>
  await expect(page.getByRole('navigation')).toBeVisible();   // <nav>
  await expect(page.getByRole('main')).toBeVisible();         // <main>
  await expect(page.getByRole('main')).toHaveCount(1);        // Exactly one <main>
  await expect(page.getByRole('contentinfo')).toBeVisible();  // <footer>
});

ARIA Snapshots (Playwright)

Playwright's toMatchAriaSnapshot() captures the accessible tree structure and asserts against it. Useful for catching regressions where visual changes break semantics.

test('navigation has correct accessible structure', async ({ page }) => {
  await page.goto('/dashboard');
  await expect(page.getByRole('navigation', { name: 'Main' })).toMatchAriaSnapshot(`
    - navigation "Main":
      - link "Dashboard"
      - link "Projects"
      - link "Settings"
      - link "Help"
  `);
});

test('form has correct accessible structure', async ({ page }) => {
  await page.goto('/settings');
  await expect(page.getByRole('form', { name: 'Profile settings' })).toMatchAriaSnapshot(`
    - form "Profile settings":
      - textbox "Display name"
      - textbox "Email address"
      - combobox "Time zone"
      - checkbox "Email notifications"
      - button "Save changes"
  `);
});

Legal Compliance Mapping

Law / StandardRegionWCAG Level RequiredEnforcement
ADAUSAAA (court precedent)Lawsuits (private right of action)
Section 508USA (federal)WCAG 2.0 AAFederal procurement requirement
EAAEUEN 301 549 (WCAG 2.1 AA)Member state enforcement (June 2025)
AODAOntario, CanadaWCAG 2.0 AAFines up to $100K/day
EN 301 549EUWCAG 2.1 AAPublic procurement requirement
Equality Act 2010UKWCAG 2.1 AA (guidance)Lawsuits

Key takeaway: If your product serves users in the US or EU, WCAG 2.1 AA is the practical minimum. WCAG 2.2 AA is recommended for new development.

Evidence to collect for audits: Automated scan results per page, manual testing checklists with tester/date, screen reader test results with AT versions, accessibility statement, VPAT for enterprise sales, remediation plan for known issues.


Anti-Patterns

Only Automated Testing

Running axe-core and declaring the product accessible because it found zero violations. Automated tools miss 60-70% of real accessibility issues. Keyboard testing, screen reader testing, and cognitive review are essential complements.

ARIA Overuse

Adding role, aria-label, and aria-describedby to elements that already have native semantics. A <button> does not need role="button". Extra ARIA can create confusing double announcements in screen readers.

Ignoring Keyboard Users

Building features that work with mouse and touch but not keyboard. Custom dropdowns that only open on click, drag-and-drop with no keyboard alternative, and hover-only tooltips all block keyboard users. Every mouse interaction needs a keyboard equivalent.

Retrofitting Accessibility

Waiting until the product is "finished" to add accessibility. By then, inaccessible patterns are baked into the component library and the cost to fix is 10-100x higher. Test accessibility from the first component.

Treating Accessibility as Optional

Deprioritizing accessibility tickets because "nobody has complained." Users with disabilities often cannot complain through the product if it is inaccessible. They leave silently. Accessibility lawsuits in the US have increased year over year since 2018.

Testing Only the Happy Path

Running accessibility checks only on the default page state. Interactive states (modals open, dropdowns expanded, error messages displayed, loading skeletons, empty states) all need accessibility testing. Components often have different ARIA attributes in different states.


Done When

  • axe-core integrated into the E2E test suite and runs automatically on all key pages (home, login, checkout, dashboard, settings).
  • CI pipeline reports zero critical or serious axe violations and blocks merge when any are introduced.
  • Keyboard navigation tested end-to-end for all interactive flows (forms, modals, dropdowns, navigation menus).
  • Color contrast validated for the full brand palette against WCAG AA thresholds (4.5:1 for normal text, 3:1 for large text and UI components).
  • Screen reader testing notes documented for complex custom widgets (date pickers, data tables, drag-and-drop), including which screen reader and version was used.

Related Skills

  • playwright-automation -- Playwright is the test runner for both automated axe-core scans and keyboard/ARIA snapshot tests; this skill provides the accessibility-specific patterns.
  • ci-cd-integration -- Accessibility tests should run in CI and block merges when violations are found.
  • risk-based-testing -- Accessibility risk assessment helps prioritize which pages and components to audit first.
  • test-strategy -- The test strategy should include accessibility as a test type with defined coverage targets and ownership.

平台分布

Codex

36.44%
按下载量换算37

Claude

26.53%
按下载量换算27

Cursor

18.11%
按下载量换算18

Gemini CLI

9.24%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills