accessibility-testing
它能做什么
这项技能说明如何在网站的测试和构建流程中加入自动无障碍检查。适合希望及早发现问题、避免重复出现的开发者。
适用场景
- ✓当你在审查一个需要可重复进行无障碍检查的组件库或页面流程时。
- ✓当你的团队希望把无障碍测试加入持续集成时。
- ✓当你需要了解哪些问题自动化测试无法发现时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/accessibility-testing/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为我的组件和结账页面添加自动无障碍测试。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用 jest-axe 和 axe-core 等工具扫描组件和页面中的问题,并把这些扫描作为测试流程的一部分运行。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Include accessibility testing
Automated accessibility testing catches 30-50% of WCAG violations before code reaches users—reducing legal risk and improving usability for everyone.
Quick Reference
- Use jest-axe for component-level accessibility testing
- Integrate @axe-core/playwright or cypress-axe for E2E a11y tests
- Run accessibility tests in CI/CD to catch regressions early
- Test specific WCAG rules like color-contrast individually
Check
Review this test suite for accessibility testing coverage using axe-core, jest-axe, or similar tools.
Fix
Add automated accessibility testing to detect WCAG violations in components and pages.
Explain
Explain how to implement automated accessibility testing and what issues it can detect.
Code Review
Inspect component tests, E2E suites, and CI workflows for automated accessibility coverage. Flag critical pages or shared components that ship without axe-based checks, and note issues that still require manual keyboard or screen reader validation.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/testing/accessibility-testing
常见问题
自动化测试能发现所有无障碍问题吗?
不能。这项技能说明,自动测试能发现结构和属性方面的问题,但键盘和屏幕阅读器的检查仍需要人工完成。
它提到了哪些工具?
组件测试使用 jest-axe;完整页面测试则使用 axe-core 配合 Playwright 或 Cypress。
这些测试应该在每次修改时都运行吗?
这项技能建议在 CI/CD 流程中运行它们,以便及早发现回归问题。
详情
作者的原始描述
Use when reviewing component libraries, page flows, or CI pipelines that need repeatable accessibility checks. Automated testing is strongest at catching structural and attribute-level issues; it does not replace keyboard, screen reader, and manual UX testing.
热度
- GitHub 星标
- 75k
- 排名
- #2708
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。