WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 5 months ago

#41020 new enhancement

Use target="_blank" for links in WordPress news and events and updates

Reported by: altonius Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.8
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:

Description

After upgrading to 4.8 Evan I clicked on the links to display info about the upgrade, however. When I did this it opened the link in the same window/tab.

Is it possible to open this in a new tab by adding the target="_blank" attribute to the link. Likewise most of the links in the Admin Dashboard under "News and Events" open in the same window/tab - would you consider opening any of these links in a separate window/tab?

To me this makes sense as they're external sites and though related, not directly related to the dashboard - and as you can head down a rabbit-hole when exploring new features / bugfixes it can be annoying to have to click back through multiple pages to get back to the dashboard.

Attachments (2)

41020.1.patch (1.9 KB) - added by shedonist 7 months ago.
Added target="_blank", associated external icon and screen reader text along with styling so icon is in line.
41020.2.patch (3.6 KB) - added by shedonist 7 months ago.
Added rel="noopener noreferrer" to the event title links and the external links in the footer of the same widget.

Download all attachments as: .zip

Change History (10)

#1 @iandunn
12 months ago

  • Component changed from General to Administration
  • Focuses ui removed

Related: #23432

#2 @iandunn
8 months ago

  • Summary changed from Use target="_blank" for links in Wordpress news and events and updates to Use target="_blank" for links in WordPress news and events and updates

#3 @shedonist
7 months ago

Following the lead of the lower links in this widget, I've added target="_blank" to the event name links, but I've also added the external link icon and associated screen reader text so that users will be aware of the external link. This is keeping in line with #23432 which promotes informing users if a link does open in an external window.

@shedonist
7 months ago

Added target="_blank", associated external icon and screen reader text along with styling so icon is in line.

#4 @shedonist
7 months ago

  • Keywords has-patch needs-testing added

#5 @birgire
7 months ago

There's a ticket #37941 about add rel="noopener noreferrer" to any target="_blank" for security reasons.

@shedonist I would think that it should also be the case for the target="_blank" in 41020.1.patch ?

#6 @shedonist
7 months ago

Great, thank you, @birgire. I've updated the patch to include

rel="noopener noreferrer"

to the event title links as well as the links in the footer of the widget (which also open externally).

@shedonist
7 months ago

Added rel="noopener noreferrer" to the event title links and the external links in the footer of the same widget.

#7 follow-up: @swissspidy
5 months ago

According to #41337 adding target="_blank" for the event links is a wontfix.

#8 in reply to: ↑ 7 @shedonist
5 months ago

Replying to swissspidy:

According to #41337 adding target="_blank" for the event links is a wontfix.

Bummer that this is a wontfix since it leaves the widget completely inconsistent within itself.

Note: See TracTickets for help on using tickets.