Appearance
Accessibility
This guide explains accessibility standards and implementation in LamaPress.
Table of Contents
- Overview
- WCAG Standards
- Implementation Guidelines
- Component Accessibility
- Testing
- Best Practices
- Related Documentation
Overview
LamaPress follows WCAG 2.1 AA standards for accessibility, ensuring websites are usable by people with disabilities.
WCAG Standards
Level AA Compliance
LamaPress aims for WCAG 2.1 Level AA compliance:
- Perceivable - Information is presentable to users
- Operable - Interface components are navigable
- Understandable - Information is readable
- Robust - Content is interpretable by assistive technologies
Key Requirements
- Color contrast ratio: 4.5:1 for normal text, 3:1 for large text
- Keyboard navigation for all interactive elements
- Focus indicators visible
- Alt text for images
- Proper heading hierarchy
- Form labels associated with inputs
Implementation Guidelines
Semantic HTML
Use semantic HTML elements:
php
<header>
<nav>
<ul>
<li><a href="/">Home</a></li>
</ul>
</nav>
</header>
<main>
<article>
<h1>Article Title</h1>
<p>Content</p>
</article>
</main>
<footer>
<p>Footer content</p>
</footer>ARIA Attributes
Use ARIA when needed:
php
<button aria-label="Close menu" aria-expanded="false">
<span aria-hidden="true">×</span>
</button>Keyboard Navigation
Ensure keyboard navigation works:
- All interactive elements focusable
- Tab order logical
- Focus indicators visible
- Skip links provided
Color Contrast
Ensure sufficient contrast:
- Normal text: 4.5:1 minimum
- Large text: 3:1 minimum
- Interactive elements: Clear focus states
Component Accessibility
Interactive Components
Make interactive components accessible:
php
<button
class="js-toggle"
aria-label="Toggle menu"
aria-expanded="false"
aria-controls="menu"
>
Menu
</button>Form Components
Accessible forms:
php
<label for="email">Email</label>
<input
type="email"
id="email"
name="email"
required
aria-describedby="email-error"
>
<span id="email-error" class="error" role="alert"></span>Media Components
Accessible media:
php
<img
src="image.jpg"
alt="Descriptive alt text"
loading="lazy"
>
<video controls aria-label="Video description">
<source src="video.mp4" type="video/mp4">
</video>Testing
Automated Testing
Use automated tools:
- Lighthouse (Chrome DevTools)
- axe DevTools
- WAVE browser extension
Manual Testing
Manual testing:
- Keyboard navigation
- Screen reader testing
- Color contrast checking
Screen Reader Testing
Test with screen readers:
- NVDA (Windows)
- VoiceOver (macOS)
- JAWS (Windows)
Best Practices
1. Use Semantic HTML
Always use semantic HTML:
<header>,<nav>,<main>,<footer><article>,<section>- Proper heading hierarchy (
<h1>to<h6>)
2. Provide Alt Text
Always provide alt text for images:
- Descriptive and meaningful
- Context-appropriate
- Empty alt for decorative images:
alt=""
3. Test with Screen Readers
Regularly test with screen readers:
- Verify navigation
- Check announcements
- Ensure content is understandable
Related Documentation
- Coding Standards - Coding guidelines
- Component Guidelines - Component patterns
- Color System - Color usage
Next Steps:
- Review Coding Standards for guidelines
- Check Component Guidelines for patterns
- See Color System for color usage