←back to thread

Just use a button

(gomakethings.com)
284 points moebrowne | 1 comments | | HN request time: 0.256s | source
Show context
lyricaljoke ◴[] No.45775130[source]
My very similar pet peeve is about websites that use `onclick` handlers and similar to implement navigation. Just use a damn anchor tag, which gets you correct link behavior for free:

* works with middle click for new tab

* integrates with accessibility devices

* works with right click + open in new window or similar options

* etc. etc. etc.

If it's notionally navigation, don't use javascript soup: use a link.

replies(11): >>45775742 #>>45775887 #>>45776191 #>>45776485 #>>45776938 #>>45776972 #>>45777023 #>>45777190 #>>45777640 #>>45779426 #>>45779654 #
zahlman ◴[] No.45777640[source]
We've reached the point, years ago even, where image hosting sites will not show you an image without JavaScript, even. Just use a damn img tag.
replies(1): >>45777911 #
1. warkdarrior ◴[] No.45777911[source]
If they link to the image directly, it makes it easier for users to share that link directly. We cannot have that, so instead we get a web page using exabytes of JS to show the image and a bunch of ads.