Web accessibility isn't a nice-to-have—it's essential. Over 1 billion people worldwide live with some form of disability. When we build inaccessible websites, we exclude potential customers, expose our organizations to legal risk, and miss opportunities to create better products for everyone. This guide covers what you need to know to build truly accessible web applications.
Why Accessibility Matters
The Business Case
- Market size: People with disabilities represent $8 trillion in annual disposable income globally
- Legal compliance: Laws like ADA, Section 508, and EAA require accessible digital experiences
- SEO benefits: Many accessibility practices improve search engine optimization
- Better UX for all: Accessible design benefits everyone—captions help in noisy environments, keyboard navigation helps power users
Types of Disabilities to Consider
- Visual: Blindness, low vision, color blindness
- Auditory: Deafness, hard of hearing
- Motor: Limited fine motor control, paralysis, tremors
- Cognitive: Learning disabilities, attention disorders, memory impairments
- Temporary/Situational: Broken arm, bright sunlight, loud environment
Understanding WCAG
The Web Content Accessibility Guidelines (WCAG) are the international standard for web accessibility. They're organized around four principles (POUR):
1. Perceivable
Users must be able to perceive the information being presented. It can't be invisible to all their senses.
2. Operable
Users must be able to operate the interface. The interface cannot require interaction that a user cannot perform.
3. Understandable
Users must be able to understand the information and operation of the interface.
4. Robust
Content must be robust enough to be interpreted by a wide variety of user agents, including assistive technologies.
Conformance Levels
- Level A: Minimum accessibility
- Level AA: Addresses major barriers (most common target)
- Level AAA: Highest level of accessibility
Essential Accessibility Practices
Semantic HTML
Use HTML elements for their intended purpose. Screen readers rely on semantic structure:
- Use
<header>,<nav>,<main>,<footer>for page structure - Use
<h1>-<h6>in logical order for headings - Use
<button>for clickable actions,<a>for navigation - Use
<ul>/<ol>for lists,<table>for tabular data
Keyboard Navigation
All functionality must be accessible via keyboard:
Tabshould move through interactive elements in logical orderEnter/Spaceshould activate buttons and linksEscapeshould close modals and dropdowns- Arrow keys should navigate within complex widgets
- Focus indicators must be visible (never
outline: nonewithout alternative)
Focus Management
- Maintain logical tab order (avoid positive
tabindexvalues) - Move focus to modals when opened, return when closed
- Trap focus within modal dialogs
- Announce dynamic content changes to screen readers
Alternative Text
Images need appropriate alt text:
- Informative images: Describe the content and function
- Decorative images: Use empty alt (
alt="") - Complex images: Provide detailed descriptions nearby
- Functional images: Describe the action (e.g., "Search", "Submit")
Color and Contrast
- Text contrast ratio: 4.5:1 minimum (3:1 for large text)
- Don't rely on color alone to convey information
- Ensure links are distinguishable from surrounding text
- Test with color blindness simulators
Forms
- Every input needs a visible
<label>associated withfor/id - Group related fields with
<fieldset>and<legend> - Provide clear error messages that identify the field and describe the error
- Don't rely on placeholder text as labels
- Support autocomplete attributes for common fields
ARIA: When HTML Isn't Enough
ARIA (Accessible Rich Internet Applications) adds semantic information for custom widgets. Follow the first rule of ARIA: Don't use ARIA if native HTML can do the job.
Common ARIA Patterns
aria-label: Provides accessible name when visible text isn't availablearia-labelledby: Points to element(s) that label this elementaria-describedby: Points to element(s) with additional descriptionaria-expanded: Indicates expandable content statearia-hidden: Hides elements from assistive technologyrole: Defines what an element is (use sparingly)
Live Regions
Announce dynamic content changes:
aria-live="polite": Announce when convenient (most common)aria-live="assertive": Announce immediately (use for errors)role="alert": Shorthand for assertive live regionrole="status": Shorthand for polite live region
Testing for Accessibility
Automated Testing
Catches about 30-40% of issues:
- axe DevTools: Browser extension for page analysis
- WAVE: Visual accessibility evaluation tool
- Lighthouse: Built into Chrome DevTools
- jest-axe: Automated testing in CI/CD
Manual Testing
Essential for comprehensive coverage:
- Navigate entire site with keyboard only
- Test with screen readers (VoiceOver, NVDA, JAWS)
- Zoom to 200% and check layout
- Test with browser zoom and text-only zoom
- Verify in Windows High Contrast Mode
User Testing
Nothing replaces testing with actual users who rely on assistive technology. Include people with disabilities in your user research.
Common Accessibility Issues and Fixes
Missing Form Labels
<!-- Bad -->
<input type="email" placeholder="Email">
<!-- Good -->
<label for="email">Email</label>
<input type="email" id="email">
Non-Descriptive Links
<!-- Bad -->
<a href="/pricing">Click here</a>
<!-- Good -->
<a href="/pricing">View pricing plans</a>
Missing Skip Links
<!-- Add at top of page -->
<a href="#main-content" class="skip-link">
Skip to main content
</a>
Inaccessible Custom Components
If you build custom dropdowns, modals, tabs, or other widgets, follow WAI-ARIA Authoring Practices for proper keyboard interaction and ARIA attributes.
Building an Accessible Culture
- Shift left: Include accessibility in design and development from the start
- Training: Ensure designers and developers understand accessibility basics
- Design system: Build accessibility into reusable components
- Acceptance criteria: Include accessibility requirements in tickets
- Regular audits: Schedule periodic comprehensive accessibility reviews
Conclusion
Accessibility is both a moral imperative and a business opportunity. By building accessible products, you expand your market, reduce legal risk, and create better experiences for everyone. The practices outlined here aren't exhaustive, but they cover the most impactful areas.
Start with semantic HTML, ensure keyboard accessibility, provide text alternatives, and test with real assistive technology users. Accessibility isn't a checklist to complete—it's an ongoing commitment to inclusive design.