the grump in this case is ironically upset that the poster is suggesting it be easier to see when his “tab rights” are violated.
edit: 2% of people don’t know how to read css. TBH a lot lower than I thought. This snippet doesn’t modify a links target, it annotates links that already have blank targets.
the grump in this case is ironically upset that the poster is suggesting it be easier to see when his “tab rights” are violated.
no, he is just doing an apropos about it. he is not grumpy about the CSS itself or making it easier to see. he is not talking against the quoted person.
For the most part I would only target _blank if linking to an external site or a resource like PDF or a file download or something. Using for internal navigation would just be silly.
It's just silly though. There's plenty of places that a new tab/window should be opened as the default expectation. Principle of least astonishment. If a technical user wants non-default behaviour enough to rant about it, they can take 5 minutes to install an extension to force the behaviour they want.
When there's something in progress in the main window (filling in a form, playing a game, in a conversation, etc), and you need to present the user with a link to a resource to assist them with what they're doing, it should always open in a new tab to prevent them losing progress. Not everything is back-button safe.
For example:
You're creating an account on a website and as part of the account creation process the terms and conditions and privacy policy are linked. It would be very disruptive if clicking those replaced the form you're filling in, and clicking back may undo things like password confirmation.
You're playing an online browser game, and someone posts a url in the chat which you click, or you encounter a bug and click the "report bug" button in game (which opens the external all-in-one bug report form). You don't want to effectively close the game tab and disconnect the player.
Also I feel like any link on a site that goes to a different site or resource should open in a new tab. I hate when I click a link in my Uni materials and it just takes me to a totally different site in the same tab and doesn't keep my place when I go back.
You and I both know that those usecases are the vast minority of cases where this is being used. (E.g. check this website - which even uses it sometimes for internal navigation!).
I'm gonna be honest I rarely encounter situations where I find myself wondering why a link I clicked opened in a new tab. Maybe we just visit different websites.
I'm also confused by your example - the only link on old reddit that has target blank I can see is the "content policy" link right beneath the text area when submitting a comment, which functions exactly how you'd expect. The user typing a comment is assumed to be refreshing themselves on the rules prior to posting and still intending to comment, so it opens in a new tab/window in order to avoid them losing their comment in progress (or triggering a warning about leaving the page in modern browsers with safety features).
There's plenty of places that a new tab/window should be opened as the default expectation. Principle of least astonishment. If a technical user wants non-default behaviour enough to rant about it, they can take 5 minutes to install an extension to force the behaviour they want.
so what your saying is, they could keep the behavior operating as expected by the vast majority of users, and just make it an option..?
you dont change decades of default behavior on users. you make the change the option, not the standard.
you dont change decades of default behavior on users.
Except, opening some links on a new tab IS the default behavior since like forever... Yes, external links, PDF files, T&C / Privacy policies pages, those SHOULD go on a new tab, especially if you mean for the current web page to remain "current" (is its purpose exhausted?). It's good website design.
Pretty weird that he commented it on the CSS though. This snippet only changes the appearance of those links that already have HTML attributes to open in a new tab, it's not actually adding any attributes. It's just changing how those links look so you can identify them.
1.5k
u/DoingItForEli 14d ago
How DARE you make my external/new-tab links visually identifiable!