| name | html-accessibility |
| description | Web accessibility (WCAG 2.1 AA) best practices for static HTML/CSS websites |
| license | Apache-2.0 |
HTML Accessibility Skill
🔴 AI FIRST Quality Principle
Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.
Purpose
Ensure websites meet WCAG 2.1 Level AA accessibility standards for inclusive user experience.
Core Principles (POUR)
Perceivable
- Text alternatives for images
- Captions for audio/video
- Sufficient color contrast
- Text resizable without loss
Operable
- Keyboard accessible
- Enough time to interact
- No seizure-inducing content
- Easy navigation
Understandable
- Readable text
- Predictable behavior
- Input assistance
- Error prevention
Robust
- Compatible with assistive tech
- Valid HTML
- Proper ARIA usage
Best Practices
Semantic HTML
<header>
<nav aria-label="Main navigation">
<ul>
<li><a href="/">Home</a></li>
</ul>
</nav>
</header>
<div class="header">
<div class="nav">...</div>
</div>
Alt Text
<img src="chart.png" alt="Bar chart showing 60% increase in usage">
<img src="chart.png" alt="chart">
Color Contrast
.text {
color: #333;
background: #fff;
}
.text {
color: #777;
background: #fff;
}
Keyboard Navigation
a:focus, button:focus {
outline: 2px solid #007bff;
outline-offset: 2px;
}
*:focus {
outline: none;
}
Testing
- Keyboard-only navigation
- Screen reader testing
- Color contrast checking
- HTML validation
- Automated tools (axe, WAVE)
References