Agent Skills
› cosmicstack-labs/mercury-agent-skills
› accessibility-testing
accessibility-testing
GitHub提供系统性网页无障碍测试与改进指南。涵盖WCAG标准、自动化(axe)、手动及辅助技术测试方法,并列出常见修复方案如alt文本和ARIA属性,旨在帮助开发者提升网站可访问性合规性。
Trigger Scenarios
需要检查网页是否符合WCAG标准
进行无障碍审计或测试
修复常见的无障碍问题
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill accessibility-testing -g -y
SKILL.md
Frontmatter
{
"name": "accessibility-testing",
"metadata": {
"tags": [
"accessibility",
"a11y",
"testing",
"wcag",
"inclusive"
],
"author": "cosmicstack-labs",
"version": "1.0.0",
"category": "testing-qa"
},
"description": "WCAG 2.1\/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation"
}
Accessibility Testing
Systematically test and improve web accessibility.
WCAG Guidelines (Quick Reference)
| Level | Conformance | Target |
|---|---|---|
| A | Minimum | Must pass all A criteria |
| AA | Standard | Legal standard (ADA, Section 508) |
| AAA | Advanced | Highest level, not always achievable |
Key Success Criteria
- 1.1.1 (A): All non-text content has text alternative
- 1.4.3 (AA): Color contrast ≥ 4.5:1
- 2.1.1 (A): All functionality via keyboard
- 2.4.7 (AA): Visible focus indicators
- 4.1.2 (A): Proper ARIA roles and attributes
Testing Approach
Automated (Catches ~30%)
// axe-core in CI
const { axe } = require('jest-axe');
it('should have no accessibility violations', async () => {
render(<MyComponent />);
const results = await axe(document.body);
expect(results).toHaveNoViolations();
});
Manual (Catches ~40%)
- Tab through all interactive elements
- Test with high contrast mode
- Zoom to 200% — no content should be cut off
- Disable CSS — content should be in logical order
Assistive Technology (Catches ~30%)
- Test with VoiceOver (macOS/iOS)
- Test with NVDA (Windows)
- Test with keyboard only (no mouse/trackpad)
Common Fixes
- Add
alttext to all images (decorative =alt="") - Add
aria-labelto icon-only buttons - Ensure forms have associated
<label>elements - Add
skip-to-contentlink - Use proper heading hierarchy (h1 → h2 → h3, never skip)
Version History
- 38e2523 Current 2026-07-05 19:42


