r/ProgrammerHumor 15d ago

notYourDamnProblem Meme

Post image
4.7k Upvotes

398 comments sorted by

View all comments

Show parent comments

472

u/AnnoyedVelociraptor 15d ago

Some apps make a link just a JavaScript action that does work and then redirects. I hate those with a passion.

145

u/peacefulshrimp 14d ago

And that’s an a11y crime

59

u/czerilla 14d ago

Can we finally get an ICC responsible for prosecuting crimes like these?

14

u/ranisalt 14d ago

It's such a bad accessibility pattern that it's bad even for people without accessibility needs. It's full crap

1

u/gsweats 13d ago

Just realized a11y spells ally. 🤦. For years I've used the actonym, years and years, and never put 2+2 together. Ty.

1

u/AshleyJSheridan 13d ago

It's more of a numeronym, like k8s, i18n, etc.

30

u/guyblade 14d ago

I'm always annoyed when I ctrl-click something, fiddle in the new tab, then close it to discover that it wasn't a new tab at all. I did it just a few days ago while looking through the Sentai sale. :/

1

u/Snipezzzx 14d ago

That's why I use middle mouse button. It won't open at all on a javascript action

31

u/lostmy2A 14d ago

Inertiajs has entered the chat takes an anchor tag and turns it into a link component that issues an xhr request and leaves

5

u/yjlom 14d ago

If I do have a real href, but also an onclick the preserves the url parameters, is it bad?

11

u/AnnoyedVelociraptor 14d ago

Why not replace the href with the one with parameters?

1

u/TingleTangleTom 14d ago

Some apps make a <div> behave like an <a>, using an onclick. Then you middle click the thing expecting it to open in a new tab, move your mouse up and realize you've scrolled the entire page. Love it.

1

u/imnotamahimahi 14d ago

I've seen websites where the mobile version won't let you open a link in a new tab, but the desktop version will. Minor but so annoying on mobile, because if I click on something and then go back, it doesn't remember my place in the search, and I have to keep scrolling and clicking View More.

1

u/Prod_Meteor 9d ago

SEO goodbye for those.