Why Accessibility Matters
- Improves usability for everyone.
- Required by WCAG standards.
- Benefits SEO (Google favors accessible sites).
Common Issues
- Missing alt text for images.
- Poor color contrast.
- Keyboard navigation not supported.
- Improper heading structure (h1 → h6).
Accessibility Audit Tools
- Lighthouse (Accessibility tab).
- axe DevTools (browser extension).
- Screen readers: NVDA, VoiceOver.
Fixes
- Alt text for images:
<img src="chart.png" alt="Sales growth chart 2025">
- Color contrast:
- Use tools like contrast-ratio.com. Minimum 4.5:1.
- Keyboard focus:
button:focus {
outline: 2px solid blue;
}
- ARIA roles:
<nav aria-label="Main navigation">
<ul>
<li><a href="/home">Home</a></li>
</ul>
</nav>
Best Practices
- Use semantic HTML (header, nav, main, footer).
- Ensure all interactive elements are reachable via Tab key.
- Provide skip links for screen readers.
<a href="#main" class="skip-link">Skip to content</a>