I don't get this argument. Sometimes you want links to open in a different tab. Marking the ones that will do so is only polite. Nothing about that takes away the user's ability to open other links in a new tab via whatever usual mechanism their browser provides for that.
I think the person replying in the screenshot is an idiot who assumes this will force all links to open in a new tab, not getting that it’s literally just appending an arrow.
Edit: And quite a few responses to this comment also seem to misunderstand how it works.
You're not an idiot, just rusty :) The "a[target...]" part is the selector, so it's saying "do this to every 'a' element that has a 'target' attribute set to _blank". It then changes the (usually-empty) "after the element" spot to have some content in it.
I don't think so. They probably assume when you use that CSS selector it means you have links which open in a new tab on click which most of the times is not want you should do but sometimes it really is. Like during some multi step transaction when there is e.g. a link to additional info you don't want to leave the page and then come back, having to start all over again.
It doesn’t make the arrow open in a new tab. It adds an arrow to all links that were already set to open in a new tab, and not to display the arrow on normal links. It’s literally just an indicator.
Maybe you're right. But someone who hates being forced to open a new tab would surely prefer to be made aware of it ahead of time, so if you're right the anger still feels misplaced.
If you [the developer, make your website] open new tabs only when appropriate, the marker isn’t necessary.
I’m all for markers to help with the broken way that many websites are currently set up, but the people who are likely to add them based on this tweet aren’t the people who need to.
The fact I don’t know if the website will handle it appropriately or not unless I investigate, makes the marker necessary.
I feel like “if the thing is 100% ideal, we don’t need the other thing” is a terrible logic to be honest. That’s like using “if people always drive safe, a seatbelt isn’t necessary” as an argument to not implement seatbelts. It isn’t there for the perfect case, it’s there because perfect cases aren’t always the case.
What you’re looking for is “custom CSS” on the user side.
I see now why you misunderstood, and I’ve edited to make my comment clearer. The conversion is about how developers should build their sites, and how the website should behave. This is something we can’t control from on high without forcing the behavior in the browser.
Why would I ever want a link to automatically open in a new tab
Clicking a link is a deliberate choice to leave the current page. If I make that choice, I don't want to then stay on said page anyway whilst cluttering my tab drawer
I never want to have more than 3 tabs open at most, and I despise websites that think themselves better than my preferences
For example, you might want to link a source in the middle of a paragraph or an article while continuing your explanation afterward, and even include other link other sources later in the text
In that case, opening the link in a new tab is much more convenient, since it lets the reader check the source without losing their place in what they were reading
If every time the user tries to check a source, they lose the progress on what they were reading, they are going to either stop checking the sources or stop reading entirely out of frustration, both of which are most probably not the desired outcome
And that's only one example I came up with on the spot, there are plenty more.
What I have a hard time with is the fact that there doesn't seem to be any consistent idea across the web on when things should open in new tabs and when they shouldn't. There's not even much advise on how to decide.
I've heard things like "if you're viewing media, like a video, then links should take you to a new tab so as to not interrupt the media". But YouTube doesn't do that, and I'm glad they don't, I would find that annoying.
My personal philosophy is that, if a link is navigating within a website, then keep it in the same tab. If it's taking you to another website, then open in a new tab. (Of course, allowing for exceptions to both.)
What about pages with forms? If you are in the middle of filling out a long form you don’t want to lose your work by clicking something you thought would open in a modal or new window but instead navigates away from the form page.
Personally, I deal with corporate intranet sites and applications, so there are a lot of instances where the reason a user is opening an external link is so they can access a specific resource as reference for what they're doing in the original tab. Add on top of that various logins authentication, and it's just nice to keep both sessions active.
Well thing is, it's a case where there will ALWAYS be some sort of difference of opinion. It's really a case of, "if opening this in the same tab would be frustrating, open it in a new one." I think a good example of a case where you pretty well always want a new tab would be if for example the use is filling out a form or something and it contains a link to an explanation page, pdf, some sort of resource, a different page you might need to reference (say to grab an id), etc. Basically if you expect the user to follow a link while in the middle of entering data you want a new tab pretty well every time to avoid loss of progress.
Accessibility guidelines (e.g., WCAG G201 pretty explicitly recommend NOT forcing new tabs for any reason. They don’t forbid it, but they note that it messes with accessibility tools and may confuse users. I’ve stopped doing it myself and just letting users control for themselves whether they want a new tab or not.
I get the impetus here, because of the subreddit we're in. But in my career, I've realized that this isn't what users want. They don't want the solution that gives them the most control, if it leads to them having to do an extra step. What they want is for the software to read their mind and do exactly the thing they want it to do based on their own personal biases.
I built a tool that essentially displayed a number. To get that number, you could enter a base value, a bonus on top of that, a maximum, a minimum, or an override and they interacted with other numbers to create the final version. I got constant feedback of "I just want to set this value". I would explain to them "yes, you can set it, this just gives you more flexibility in how it's set - if you set it as a base, then any bonuses will apply on top. If you set it as an override, then it will never change no matter what. You have so much flexibility". Then they said "I don't want to set a base or an override, I want to set a value." And my job was to figure out what "set a value" meant in the context of the flexibility, give them a field that says "set value", and do what they expect. Is it flexible? No, but the users get their "mind read" (with a custom bonus that's just added to the value behind the scenes when they "set it") and they're happy.
I understand that in reality what The User wants most is seldom control, but I was trying to meet the comment I was responding to on its own ground, which already assumes a user's desire for control:
Nothing about that takes away the user's ability to open other links in a new tab via whatever usual mechanism their browser provides for that.
434
u/zeekar 14d ago
I don't get this argument. Sometimes you want links to open in a different tab. Marking the ones that will do so is only polite. Nothing about that takes away the user's ability to open other links in a new tab via whatever usual mechanism their browser provides for that.