Ask HN: How do we get Google and Twitter to use href attributes again?
I keep finding new places where Google and Twitter use <button> elements or <a> elements with an onclick handler instead of an href attribute; see this example on a search result page:
https://i.imgur.com/MjyoyJr.png
and this example on Google Maps: https://twitter.com/beaugunderson/status/1428011803179507715
and this example on Twitter's trending topics: https://twitter.com/beaugunderson/status/1428441375444377601
There are probably many reasons to care about this but mine is that I want to cmd-click more than one result at a time to open them in tabs and I can't do that if they don't have hrefs.While I don't use a screen reader it seems like a worse experience because of this if one does:
https://a11y-101.com/design/button-vs-link
https://naga.co.za/2020/03/13/links-vs-buttons/
It's become a truism that Google only fixes things when they appear on HN and whichever PM is responsible notices them; here's hoping that happens here.
13 comments
[ 2.9 ms ] story [ 37.8 ms ] threadOnce you adopt that attitude “making” large corporations behave reasonably stops being something you worry about.
Even if you don't use Google, however, the way they implement things sets a precedent for the rest of the web... and I don't want this practice to spread.
Pick a close instance from https://github.com/zedeus/nitter/wiki/Instances
I have installed https://addons.mozilla.org/en-US/firefox/addon/nitter-redire...
I still want Twitter to fix their trending topics "links" though because if their presumably smart engineers can break things like that then others will follow suit and we'll all suffer as a result. I may be tilting at windmills but I can't help myself.
That's plainly false. You can easily add onclick handlers to a tags, or have them redirect through a tracker, or basically any other thing that would work on a button tag.