Hey everyone! đ
Letâs be realâmost of us donât think about web accessibility until we have to. I was the same. When I started building websites, my focus was on design, performance, and making things look cool. But then I worked on a project where accessibility was a must, and I realized...
đ¨ I had been unknowingly building websites that some people couldnât even use. đ¨
That hit me hard. Imagine needing the internet for work, school, or even ordering foodâbut struggling because a website isnât designed for you. So, I did a deep dive into accessibility, and now I want to share what Iâve learned.
Hereâs how to make your websites usable for everyoneânot just those with perfect vision, hearing, or motor skills.
1. Use Semantic HTML (Your Future Self Will Thank You) đď¸
I used to throw <div>s everywhere like confetti. Turns out, thatâs terrible for accessibility (and SEO).
Why it matters:
â
Screen readers rely on proper tags to understand content.
â
Less work for you laterâsemantic HTML improves structure and makes styles easier to apply.
Easy Fixes:
â Bad: <div class="button">Click me</div>
â
Good: <button>Click me</button>
â Bad: <div class="nav"> (just use <nav>)
â
Good: <nav> ... </nav>
Using the right HTML tags means assistive technologies can interpret your site properlyâwithout weird workarounds.
2. Color Contrast: Not Everyone Sees Like You Do đ¨
I love a good aesthetic website, but letâs be honestâsome designs prioritize beauty over usability. Ever seen light gray text on a white background? Yeah, donât do that.
Test Your Colors:
â
Use tools like WebAIM Contrast Checker.
â
Aim for a 4.5:1 contrast ratio for text (big text can be 3:1).
â
Donât rely only on color for meaning (e.g., âRed = Errorâ isnât helpful for colorblind users).
Small fix, huge impact.
3. Make Your Website Keyboard-Friendly â¨ď¸
Some people canât use a mouse due to motor disabilities. Your site should work with just a keyboard (or other assistive devices).
Try this challenge:
đ Go to your website and navigate using only Tab, Enter, and Arrow keys.
- Can you access everything?
- Does it skip important links?
- Are you stuck somewhere?
If your site breaks without a mouse, itâs time for fixes:
Best Practices:
â
Use button instead of clickable <div>s (buttons are naturally keyboard-friendly).
â
Ensure forms and links can be accessed via Tab key.
â
Add :focus styles so users know where they are when tabbing.
If youâve never done this before, trust meâitâs an eye-opener.
4. Add Alternative Text for Images (Alt Text = Super Important) đźď¸
I used to completely ignore alt text. I figured, âEh, the image is just decorative.â But for blind users who rely on screen readers, missing alt text = missing information.
Quick Guide:
â
For meaningful images:
<img src="profile.jpg" alt="John Doe, smiling with a coffee cup">
â
For decorative images:
<img src="stars.png" alt=""> (Empty alt hides it from screen readers, which is fine for purely decorative elements).
Rule of thumb: If removing the image removes meaning, it needs alt text.
5. Caption Videos & Provide Transcripts đ˝ď¸
Imagine watching a tutorial without soundâwould you still understand it? Thatâs the experience for deaf or hard-of-hearing users when videos have no captions.
What to do:
â
Use closed captions for videos (YouTube auto-captions are a start, but theyâre not perfect).
â
Provide text transcripts for audio content.
â
Donât rely solely on audio for instructionsâoffer visual alternatives.
Your content should be accessible to those who canât hear or process audio easily.
6. Forms: Donât Make Users Guess What to Type đ
Forms can be a nightmare if theyâre not accessible. Imagine filling out a form with no labels, vague errors, or no guidance.
Make Forms Better:
â
Use <label> for inputs (not just placeholder text).
â
Make error messages clear (instead of just âInvalid inputâ).
â
Ensure form fields have a logical order (so screen readers donât jump randomly).
â Bad Example:
<input type="text" placeholder="Enter your name">
â
Good Example:
<label for="name">Full Name:</label>
<input type="text" id="name" name="name">
This tiny fix improves both accessibility and user experience.
7. ARIA: When HTML Needs a Little Help đď¸
Sometimes, default HTML doesnât cover everything. Thatâs where ARIA (Accessible Rich Internet Applications) helps.
đ Use ARIA when thereâs no built-in semantic HTML option.
â
Example: Making a custom dropdown accessible
<div role="combobox" aria-expanded="false">
<div role="option">Option 1</div>
<div role="option">Option 2</div>
</div>
đ¨ BUT! Donât overuse ARIAâif regular HTML works, use that instead.
Final Thoughts: Accessibility Benefits EVERYONE đ
Hereâs the thingâaccessibility isnât just for people with disabilities. It helps:
â
Users with slow internet (text loads faster than images).
â
People in noisy environments (captions help in loud places).
â
Elderly users (better readability, easier navigation).
â
EVERYONE.
I used to think accessibility was extra work. But once I started, I realized itâs just about good designâand it makes the web better for everyone.
Want a challenge?
Take your own website and try using it with only a keyboard or a screen reader. Youâll be surprised what you learn!
Top comments (0)