I found myself in one of those famous Twitter debates* the other day and off the back of it, I thought I’d create a short article about how we should should always consider context and caveats when we make bold statements.
The context of that particular conversation was around a hot take that I’ll paraphrase:
“Native buttons aren’t great and this one that has been developed is better and fully accessible”
<div> (or equivalent) as its base. In the interests of fairness, it is completely possible to do this, thanks to ARIA. The problem that I have, though, is less about the technical specifics, but more about the wider potential damage of a developer discovering this
<div>s are suddenly completely inaccessible. Not great for most users on the web who use under-powered devices on slow connections, right?
The developer who discovered the
<div> button will probably think it’s ok to use it, because a figure of authority said so. They’ll probably then just attach a click event to a
<div> button will be wholly inappropriate. If you need some numbers as context, WordPress still powers 34% of all websites (and rising).
Now let me fix up the original quote from earlier in the article in a more responsible manner, with the appropriate context and caveats:
I can understand why those caveats aren’t added to the original broadcast because the potential for those precious likes and retweets is massively reduced.
What it really comes down to, in my opinion, is that the folks that broadcast these sort of hot takes are still learning and probably aren’t very experienced, yet. This is fine, because we’ve all got to start somewhere and we work in a very immature industry. An appreciation of the wider context of the web comes with experience and they’ll get there, eventually. It’s useful to remember this when you read their tweets that are lacking in detail, so make sure you get some confirmation of their claims, before your implement on your own projects.
My main advice to you, dear reader, is to diversify your Twitter following list so that you get a vast range of opinion and knowledge to get you that experienced, well considered advice, more efficiently.
I’ll close this article with an analogy. Inventing a new button with a
<div> because there’s one or two easily fixable quirks with a native
<button> is like burning your house down because the windows need a clean. It’s a very drastic, unnecessary approach when in reality, all you needed was some soapy water and a sponge.
* The conversation isn’t worth linking as some of the tweets that give it the right context have since been deleted.