Is it possible to make custom section link go _blank in order to be opened in a new tab? There are many theme components providing this ability too
We did discuss at some point whether external links in the sidebar should open in a new tab, but decided to respect the user preference.
Can you share a case or two from your own site where you feel like it’d be better to override that user preference and force the link to open in a new tab?
Sure. Maybe our approach is just different. I truly believe if the link is external it is much polite to forward user’s browser to separate tab. That prevents them from interrupting the experience they have/had while being at Forum pages.
Our forum is highly active, not sure it’s okay for a user to be interrupted by leaving the website altogether by following the link. The link leads to our Telegram channel, if this is the case.
In the end, I do not propose making external links open _blank by default. I suggest you give Discourse admins an ability to control how any links open from this specific component/configuration feature
Temporary solution: If you right click on an item, you get the option to open it in a new tab.
Agreed, your progress would never get interrupted when links open in a new tab.
i tend to agree with this. like the above scenario with a telegram channel, clearly there are going to be cases where overriding the user preferences is ideal for admin created custom links. in theme components we target _blank often so i’m not sure why this option can’t be here as part of the custom side-bar config modal (unless it’s a case of real estate and there is no room there).
i actually have a admin customized side-bar links on my forum as well where i would be inclined to override the user setting for links.
You believe that if the user has expressed the preference to have links opened in the same window it’s more polite not to do what they have expressly indicated?
People who use screen readers are the ones most inconvenienced by opening things in new tabs when they don’t expect it. That’s why it’s generally recommended not to hijack links into a new tab (even though it’s what you and I prefer).
You can change the user default preference to open in a new tab, and also apply that setting to all users. That will allow your site to be more polite without violating the user preferences.
this is a really good point.
As someone who actually uses a screen reader (and all the fun issues some theme components create for them) I can confirm, it’s generally a bad idea to force new tabs.