Accessibility fixes that cost almost nothing
You don't need a separate accessibility project. Most of the gains come from a handful of small habits you can start today.
On this page
For a long time I treated accessibility as a thing you do at the end, if there's time, usually after someone complains. That's a bad plan, because it's far harder to retrofit than to build in. These days I try to do a few small things while I write the component, when they cost almost nothing.
Use the right element
A button should be a <button>, not a <div onClick>. This one thing gets you keyboard focus, Enter and Space handling, and the right meaning for screen readers, without any extra code. I've seen entire apps built from clickable divs where nothing works from the keyboard, and the fix would have been changing a tag name.
Same with links versus buttons. A link goes somewhere. A button does something. If you mix them up, people using assistive tech get confused, and so do search engines.
Labels on everything you can type into
Every input needs a label that's actually connected to it. A placeholder isn't a label. It disappears the moment you start typing, and it's often too low in contrast to read anyway. A visible <label> takes one line and helps everybody, not only people with disabilities. Small phones, in the sun, with shaky hands, it all counts.
Focus should be visible
I used to remove the focus outline because I thought it looked ugly. I'd never tried using my own site with only a keyboard, and when I finally did it was miserable, because I couldn't tell where I was. Now I style the focus ring instead of removing it, so it fits the design and still shows up.
It's worth spending five minutes tabbing through any page you build. If you get lost, a lot of other people do too.
Contrast, honestly
Light grey text on a dark background looks elegant in a design tool and is awful on a phone outside. I've been guilty of it a lot, with small captions especially. The fix is just a slightly brighter colour. Pick a contrast checker, test the actual values, and nudge things until they pass. It rarely changes the feel of the design at all.
Respect people who want less motion
Some people get dizzy or distracted from lots of movement on the screen. Browsers let them say so, and CSS can listen with prefers-reduced-motion. So all my animations check for it. I have a lot of animation on some of my own projects, which makes this more important, not less. A calm version of the page should always exist.
Give images and icons a purpose
If an image carries meaning, describe it in the alt text. If it's decoration, say so with an empty alt so a screen reader skips it. For an icon-only button, add a label, since "button" with no name is the worst thing to hear. It's one attribute.
Test it for ten minutes
None of this needs a specialist. Use your site with just the keyboard. Zoom the page to 200 percent. Turn on a screen reader for a minute, even if you feel clumsy. Run an automated check like Lighthouse, which catches the easy stuff, then fix whatever it finds.
You won't be perfect. I'm not. But every one of these is cheap while you're building and expensive afterwards, and that's reason enough to start now.
Enjoyed this? Pass it on
Written by Vishwajit Bhosle
I build and lead web and mobile products from Pune, and write about what I run into along the way. If something here helped, or you have a project in mind, say hello.
Follow along
New posts show up in any feed reader the moment they are published: no account, no email, no tracking.
Comments
Anyone can comment, no sign-up. Upvote what helped, reply to anyone. I read all of them and reply where I can.
Loading comments…