accessibility-testing by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill accessibility-testing无障碍测试确保网络应用程序可供残障人士使用,包括那些使用屏幕阅读器、键盘导航或其他辅助技术的人。它验证是否符合 WCAG(网络内容无障碍指南)并识别无障碍访问的障碍。
最小工作示例:
// 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([]);
});
// ... (完整实现请参阅参考指南)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/ 目录中的详细实现:
| 指南 | 内容 |
|---|---|
| axe-core with Playwright | axe-core 与 Playwright |
| 键盘导航测试 | 键盘导航测试 |
| ARIA 测试 | ARIA 测试 |
| Jest with jest-axe | Jest 与 jest-axe |
| Cypress 无障碍测试 | Cypress 无障碍测试 |
| Python with Selenium and axe | Python 与 Selenium 和 axe |
display:none 隐藏可聚焦内容每周安装数
138
代码仓库
GitHub 星标数
116
首次出现
2026年1月21日
安全审计
安装于
opencode119
gemini-cli115
codex113
claude-code112
cursor107
github-copilot98
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.
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)
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 |
Weekly Installs
138
Repository
GitHub Stars
116
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode119
gemini-cli115
codex113
claude-code112
cursor107
github-copilot98
GitHub Actions 官方文档查询助手 - 精准解答 CI/CD 工作流问题
33,800 周安装