The Curb Cut Analogy
Curb cuts (ramps on sidewalks):
- Designed for wheelchairs
- Also help: strollers, bikes, luggage, delivery carts
- Everyone benefits!
Web accessibility benefits everyone. Designed for disabilities, improves experience for all.
What Is Web Accessibility?
A11y = Accessibility (a + 11 letters + y)
Making websites usable by:
- Blind users (screen readers)
- Deaf users (captions)
- Motor impaired (keyboard navigation)
- Cognitive differences (clear content)
- Temporary disabilities (arm injury)
- Situational (bright sun, loud room)
Why Accessibility Matters
1. It's the Right Thing
15% of population has some disability.
Everyone deserves equal access.
2. Legal Requirements
Many countries have laws:
- ADA (USA)
- EAA (Europe)
- Accessibility laws (Australia, UK, etc.)
Inaccessible sites face lawsuits.
3. Better for Everyone
Captions: Deaf users, noisy environments
Large text: Low vision, small screens
Keyboard nav: Motor impaired, power users
Clear content: Cognitive, second language
4. Better SEO
Search engines are like blind users.
Can't see images.
Need text alternatives.
Accessible = Better SEO.
WCAG Guidelines
WCAG = Web Content Accessibility Guidelines
Four principles: POUR
Perceivable: Can users perceive the content?
Operable: Can users navigate and interact?
Understandable: Can users understand the content?
Robust: Does it work with assistive tech?
Conformance Levels
A: Minimum (basic access)
AA: Standard (most requirements)
AAA: Maximum (best possible)
Target AA usually. AAA where practical.
Key Accessibility Features
1. Alt Text for Images
Screen readers can't see images.
Alt text describes them.
Good:
<img alt="Golden retriever playing fetch in a park">
Bad:
<img alt="image">
<img alt=""> (unless decorative)
Be descriptive but concise.
2. Semantic HTML
Use elements for their meaning:
✓ <nav> for navigation
✓ <main> for main content
✓ <button> for buttons
✓ <h1>, <h2> for headings
✗ <div onclick> instead of <button>
✗ Making everything a <div>
Semantic HTML is inherently accessible.
3. Keyboard Navigation
Many users can't use a mouse.
Everything must work with keyboard.
Tab: Move between elements
Enter/Space: Activate buttons
Arrow keys: Navigate menus
Focus indicators must be visible!
4. Color Contrast
Light gray text on white? Hard to read.
WCAG requirements:
Normal text: 4.5:1 contrast ratio
Large text: 3:1 contrast ratio
Use contrast checker tools.
5. Labels for Forms
Every input needs a label.
✓ <label for="email">Email</label>
<input id="email" type="email">
✗ <input placeholder="Enter email">
(Placeholder is not a label!)
ARIA (When Needed)
ARIA = Accessible Rich Internet Applications
Adds semantics when HTML isn't enough.
First rule of ARIA:
Don't use ARIA if HTML works!
<button> is better than
<div role="button" tabindex="0" ...>
Common ARIA Attributes
role: What is this element?
aria-label: Label for screen reader
aria-hidden: Hide from screen readers
aria-expanded: Is dropdown open?
aria-live: Announce dynamic content
Testing Accessibility
Automated Tools
axe DevTools (browser extension)
Lighthouse (Chrome DevTools)
WAVE (web tool)
Find many issues automatically.
But can't catch everything!
Manual Testing
1. Tab through the page
Can you reach everything?
Is focus visible?
2. Use screen reader
Does it make sense?
VoiceOver (Mac), NVDA (Windows)
3. Zoom to 200%
Does content still work?
4. Disable CSS
Is content still readable?
Common Mistakes
1. Missing Alt Text
Image with no alt = Invisible to screen readers.
Or worse: File name read aloud.
Usually provide meaningful alt text.
Decorative images: alt=""
2. Poor Color Contrast
"It looks fine to me!"
Use tools to check.
Don't rely only on color.
3. Keyboard Traps
User tabs into modal.
Can't tab out!
Ensure keyboard users can escape.
4. Non-Semantic HTML
<div> and <span> for everything.
No meaning to assistive tech.
Use proper elements: <nav>, <button>, <h1>, etc.
5. Missing Focus Styles
outline: none; ← DON'T DO THIS
Keyboard users need to see focus.
Style it, don't remove it.
Quick Wins
✓ Add alt text to images
✓ Use semantic HTML
✓ Ensure color contrast (4.5:1)
✓ Make forms accessible (labels)
✓ Test with keyboard
✓ Don't remove focus styles
✓ Add skip links
✓ Caption videos
FAQ
Q: Isn't accessibility expensive?
Building accessible from start is cheap. Retrofitting is expensive. Start early.
Q: Do I need to be perfect?
Progress over perfection. Aim for AA. Improve continuously.
Q: Who uses screen readers?
Blind users, low vision, some learning disabilities, and power users!
Q: How do I test screen readers?
VoiceOver (built into Mac), NVDA (free for Windows), TalkBack (Android).
Summary
Web accessibility ensures websites work for everyone, including people with disabilities.
Key Takeaways:
- A11y benefits everyone, not just disabled users
- WCAG provides guidelines (aim for AA)
- Semantic HTML is inherently accessible
- Alt text describes images
- Everything must work with keyboard
- Color contrast must be sufficient
- Test with automated tools AND manually
Accessible websites are better websites!
Related Concepts
Leave a Comment
Comments (0)
Be the first to comment on this concept.
Comments are approved automatically.