Web Accessibility Basics
Make your apps usable with a keyboard, a screen reader and low vision, which also makes them better for everyone.
Beginner · about 4 hours · difficulty 2/5
Learn first: Semantic HTML, CSS Fundamentals
Accessibility (a11y) is part of building correctly, not a polish step. Government and large company portals in India increasingly have to meet accessibility guidelines, and interviewers notice when you mention it.
The essentials
- Keyboard: every interactive element reachable with Tab, usable with Enter or Space, with a visible focus style.
- Semantics first: native elements (button, a, label, input) come with accessibility for free.
- Text alternatives: alt text for meaningful images, empty alt for decorative ones.
- Colour contrast: body text should meet WCAG AA contrast ratios. Never use colour alone to show errors.
- Forms: labels tied to inputs, errors announced in text next to the field.
ARIA, carefully
ARIA attributes (aria-label, aria-expanded, role) fill gaps for custom widgets like modals and tabs. The first rule of ARIA is to not use it when a native element works. Wrong ARIA is worse than none.
Testing
Run Lighthouse or axe DevTools, then actually tab through your page and try a screen reader (NVDA on Windows, VoiceOver on Mac or iPhone, TalkBack on Android).
Pitfalls
- Modals that do not trap or return focus.
- Placeholder text used instead of labels.
- Auto-playing carousels with no pause control.
You are ready to move on when you can complete your own signup flow using only the keyboard and get no serious issues in an automated audit.
Key concepts
- Keyboard navigation and focus
- Semantic elements first
- Alt text
- Colour contrast
- Accessible forms and errors
- ARIA roles and states
- Screen reader testing
- WCAG levels
Mini project
Audit your job listings page with Lighthouse and a screen reader. Fix every issue you find and write a short before and after note in the README.
Check yourself
Your form shows invalid fields with only a red border. Why is that a problem, and what should you add?
Free resources
- Accessibility (MDN)
- Learn Accessibility (web.dev)
- WCAG Overview (W3C WAI)