I was auditing some code for a product the other day. It was div
-galore. Lists were div
s. Navigation links were div
s. Buttons, also div
s.
Needless to say I had thoughts about this.
I brought it up pointing out that it's impossible to use with a keyboard. And then they hit me. They've "researched" and talked to "some people" and they all said they'd use a desktop computer with a mouse to access it. So there was no need now for keyboard navigation.
Like the Germans say, Hallo!?
Some users isn't all users. It isn't even most users. Some users is a small, select group of people that you were able to talk to.
But accessibility isn't about the users you can easily find and chat to over coffee. What about the ones you haven't met yet? And the ones you'll likely never meet? That's your target market. You won't make money with "some users."
That div
-with-onclick
approach works until it doesn't. Using a proper button
just works.
Changing a div
to a button
takes less than 30 seconds. Add about a minute more to add the proper styles. So in two minutes flat you can make sure everyone can click the thing.
Debating the value of buttons took longer.
Asking people if they used a mouse or not took longer.
Isn't easier to just do the work?
Apparently not, because we left that de-prioritised.