Web Accessibility: Not Just Nice to Have, But Essential
Last month, I watched my grandmother try to use a banking website. She’s 78, has mild vision issues, and isn’t the most tech-savvy person. What should have been a simple task—checking her account balance—turned into a 20-minute frustration fest. The text was too small, the buttons weren’t clearly labeled, and the contrast was so poor she couldn’t distinguish between different sections.
That’s when it hit me: accessibility isn’t about compliance checkboxes or legal requirements. It’s about building web experiences that work for actual human beings.
The Reality Check
Here are some statistics that might surprise you:
- 1 in 4 adults in the US live with a disability
- 8.1 million people have a vision disability
- 11.5 million people have a hearing disability
- 13.7 million people have a cognitive disability
But accessibility isn’t just about permanent disabilities. It’s also about:
- Someone with a broken arm trying to navigate with one hand
- A parent holding a baby while browsing on mobile
- Anyone using a device in bright sunlight where contrast matters
- People in noisy environments who can’t hear audio
We’re all temporarily able-bodied.
Common Accessibility Sins (And How to Fix Them)
1. The Color-Only Information Problem
❌ Wrong:
<span style="color: red;">Required field</span>
âś… Better:
<span style="color: red;">
<span aria-label="Required">*</span>
Required field
</span>
Don’t rely solely on color to convey information. Add icons, text, or other visual indicators.
2. The Mystery Meat Navigation
❌ Wrong:
<button>
<svg>...</svg>
</button>
âś… Better:
<button aria-label="Close dialog">
<svg aria-hidden="true">...</svg>
</button>
Icon-only buttons are confusing for screen reader users. Always provide descriptive labels.
3. The Keyboard Trap
❌ Wrong:
button:focus {
outline: none;
}
âś… Better:
button:focus {
outline: 2px solid #0066cc;
outline-offset: 2px;
}
Never remove focus indicators without providing an alternative. Many users navigate exclusively with keyboards.
4. The Phantom Form Error
❌ Wrong:
<input type="email" required>
<div id="error" style="color: red; display: none;">
Invalid email
</div>
âś… Better:
<input type="email" required aria-describedby="email-error">
<div id="email-error" role="alert" style="color: red; display: none;">
Invalid email address. Please use format: name@example.com
</div>
Connect form errors to their inputs and provide clear, actionable error messages.
The ARIA Toolkit (Use Wisely)
ARIA (Accessible Rich Internet Applications) is powerful, but it’s often misused. Here are the golden rules:
Rule #1: Semantic HTML First
<!-- Don't do this -->
<div role="button" tabindex="0" onclick="doSomething()">
Click me
</div>
<!-- Do this instead -->
<button onclick="doSomething()">
Click me
</button>
If there’s a semantic HTML element for what you’re building, use it.
Rule #2: ARIA Labels for Context
<button aria-label="Delete user John Smith">
🗑️
</button>
<input aria-label="Search products" placeholder="Enter product name...">
Provide context that isn’t visually obvious.
Rule #3: Live Regions for Dynamic Content
<div aria-live="polite" id="status">
<!-- Status updates appear here -->
</div>
<div aria-live="assertive" id="errors">
<!-- Critical errors appear here -->
</div>
Announce dynamic content changes to screen reader users.
Building Accessible Components
The Accessible Modal
<div role="dialog" aria-labelledby="modal-title" aria-modal="true">
<div class="modal-header">
<h2 id="modal-title">Confirm Deletion</h2>
<button aria-label="Close modal" onclick="closeModal()">Ă—</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete this item?</p>
</div>
<div class="modal-footer">
<button onclick="confirmDelete()">Delete</button>
<button onclick="closeModal()">Cancel</button>
</div>
</div>
Key features:
- Proper ARIA roles and properties
- Accessible close button
- Focus management (trap focus inside modal)
- Escape key handling
The Accessible Dropdown
<div class="dropdown">
<button
aria-expanded="false"
aria-haspopup="true"
aria-controls="dropdown-menu"
id="dropdown-trigger">
Options â–Ľ
</button>
<ul id="dropdown-menu" role="menu" hidden>
<li role="none">
<button role="menuitem">Edit</button>
</li>
<li role="none">
<button role="menuitem">Delete</button>
</li>
</ul>
</div>
Features arrow key navigation, proper ARIA states, and escape key handling.
Testing Your Accessibility
Automated Testing Tools
axe DevTools: The gold standard browser extension
// You can also integrate axe into your test suite
import { axe, toHaveNoViolations } from 'jest-axe';
expect.extend(toHaveNoViolations);
test('should not have accessibility violations', async () => {
const results = await axe(container);
expect(results).toHaveNoViolations();
});
Lighthouse: Built into Chrome DevTools with accessibility audits
Manual Testing Checklist
-
Keyboard Navigation: Can you use the entire interface with just Tab, Enter, Space, and arrow keys?
-
Screen Reader Testing: Use NVDA (Windows), JAWS (Windows), or VoiceOver (Mac) to navigate your site
-
Color Contrast: Use tools like WebAIM’s contrast checker to ensure sufficient contrast ratios
-
Zoom Testing: Zoom to 200% and ensure everything still works
-
Focus Management: Make sure focus moves logically and is always visible
The Business Case for Accessibility
Beyond doing the right thing, accessibility makes business sense:
Larger Market Reach
- Purple Pound: People with disabilities have ÂŁ274 billion in spending power in the UK
- US Market: $490 billion in disposable income annually
SEO Benefits
- Semantic HTML improves search engine understanding
- Alt text helps image search
- Good heading structure improves content hierarchy
Better UX for Everyone
- Captions help in noisy environments
- High contrast helps in bright sunlight
- Clear navigation benefits all users
- Voice controls help hands-free usage
Legal Protection
- ADA compliance reduces litigation risk
- WCAG 2.1 AA is the international standard
- European Accessibility Act coming in 2025
Accessibility-First Design Principles
1. Perceivable
- Provide text alternatives for images
- Use sufficient color contrast
- Make content adaptable to different presentations
2. Operable
- Make functionality available via keyboard
- Give users enough time to read content
- Don’t use content that causes seizures
3. Understandable
- Make text readable and understandable
- Make content appear and operate predictably
- Help users avoid and correct mistakes
4. Robust
- Maximize compatibility with assistive technologies
- Use valid, semantic HTML
- Test with actual assistive technology
Common Misconceptions
”Accessibility is Ugly”
False. Look at GitHub, BBC, or gov.uk. Beautiful design and accessibility go hand in hand.
”Accessibility is Expensive”
Partially true. Retrofitting is expensive. Building accessibly from the start is cheap.
”Blind Users Don’t Use Images”
False. Screen readers read alt text. Many users with low vision use screen magnifiers.
”ARIA Fixes Everything”
Dangerous thinking. ARIA should supplement, not replace, semantic HTML.
Getting Started Today
1. Audit Your Current Site
Run Lighthouse and axe on your key pages. Fix the obvious issues first.
2. Establish Guidelines
Create accessibility guidelines for your team. Include them in your definition of done.
3. Learn Gradual Enhancement
Build from a solid HTML foundation, then enhance with CSS and JavaScript.
4. Test with Real Users
Nothing beats testing with actual users who rely on assistive technology.
The Path Forward
Accessibility isn’t a destination—it’s an ongoing practice. Start small:
- Fix color contrast issues
- Add proper alt text to images
- Ensure keyboard navigation works
- Add focus indicators
- Use semantic HTML elements
Every small improvement makes the web more inclusive for everyone.
Remember my grandmother and her banking struggle? After I showed the bank’s UX team her experience, they redesigned their interface. Six months later, she called me excited—she had successfully paid her bills online for the first time.
That’s the power of accessible design. It doesn’t just check compliance boxes. It gives people independence, dignity, and equal access to information.
The web should work for everyone. Let’s make sure it does.
Want to learn more? Check out WebAIM and the a11y Project for excellent accessibility resources.