Exactly this. Yes, accessibility is very important, but as of right now, it takes non-zero effort to implement correctly. So you must balance that with other priorities depending on the goals of the project.
The goals of the project includes "custom buttons"? There's so much functionality that you get for free/low effort if you don't feel the need to customize everything to the nines.
Right? One of my peeves with a lot of developers is when they treat every programming project like it's a commercial start up. There's no reason "learning to implement custom buttons" can't be on your list of goals.
Depends on whether the idea behind "learn to implement custom buttons" is "because I want to have custom buttons on my website" or "because I want to be able to use this knowledge on future projects."
If you want to learn to make custom buttons with the idea being to be able to apply that knowledge elsewhere, you probably ought to learn to do them accessibly.
There are about 100 ways to do any given thing when building web apps, and it's a constantly shifting landscape where "the way" you do a bunch of things is different every time you start a new app (at least it feels that way to me).
Being really good at front-end (to the point you know when to use a native control or not, which "standard" features you can rely on, how to think about accessibility+responsive+dark mode+ad blockers+low bandwidth+seo etc) is an entire discipline that takes a lot of effort to stay current in.
If you use pure, standard html with default styling you still end up with a page using bad colors and Times New Roman that looks straight out of the 90s. If that's not the look you're going for, you need to do some customization (via CSS) and the difference between "some" and "to the nines" is not exactly a clear line -- even to people that have specialized their careers in front-end dev.
If the decision comes down to "I can't get the exact shade of cornflower blue I want on this button unless I make it a div, but that will hurt accessibility" and you chose the exact shade of cornflower blue, your priorities are wrong. And not just because you hurt accessibility, but because you probably made more work for yourself.
We went through this 15 years ago with custom scroll bars that didn't look like scroll bars, didn't operate like scroll bars and didn't interact like scroll bars, all because it could happen. An Ian Malcom quote comes to mind.
I don't think that's a conscious decision though. What happens is:
- I can't get this exact shade of cornflower blue
- Oh, here's a solution that works! Oh, it doesn't work in all browsers
- Hmm, here's a stack overflow answer that says use a div. It's 5 years old, is that current? Dunno but it has 457 up votes and works
Some people are concerned about accessibility but the JavaScript doesn't work in iOS. Others have iOS support but they screwed up cache headers and it's super slow on any low bandwidth connection.
Balancing all those things (and that's a very incomplete list) is hard and it's not fair to expect side/hobby/oss projects to do it 100%.
Huh? You can get whatever shade you want. Just use a reset stylesheet for buttons and then you can style them like you would any other div. They work in every browser, too. I understand the argument that a decade ago this was trickier, but that time has long since passed. Style your button with css.
Do you think buildings shouldn’t be wheelchair accessible, because not many people are wheelchair bound? Most western societies have made the decision culturally that even though its disproportionately expensive, that the cost is worth spending to (as much as is reasonable) make things accessible. (Legislators are on board in many countries too.)
I see your point - this website is really cool and its classic HN to have the top comment complain about a minor point. But also, because accessibility and security are invisible to most of us, vigilance is the only way it’ll happen.
> Do you think buildings shouldn’t be wheelchair accessible, because not many people are wheelchair bound?
Businesses should choose to make their business accessible based on cost and profitability. Your eternal vigilance is a joke. It makes sane people wonder what shortcoming you're compensating for.
I'm making up for fact that, but for a twist of fate, it could have been me sitting in that wheelchair. It could be me blind, browsing the web with a screen reader and a hope that the websites I visit aren't an incomprehensible mess of divs. Which only happens because somebody was too lazy to spend 5 minutes googling how to style a button with CSS.
I believe its worth burning some of society's resources inefficiently in exchange for evening out the scales of chance a little. Its the same reason I think everyone has a right to free healthcare. (Which is completely non-controversial here in australia.)
Call me names all day if you need to. I stand by my politics.
In most matters, as in life too, you cannot win once and for all, only push through constantly or lose if you don't. Being vigilant at all times about a cause you think is important is usually the only way to go.