Opened 5 weeks ago
Closed 4 weeks ago
#65446 closed enhancement (wontfix)
Open "Visit Site" / "View Site" admin links in a new tab
| Reported by: | 369work | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch close target-blank |
| Cc: | Focuses: | accessibility |
Description
Problem
Two admin links intended for front-end verification currently open in the same tab:
- Admin bar → "Visit Site" (site name menu) Admins click this to quickly check the front end while working in the admin. Because it opens in the same tab, they must right-click and choose "Open in new tab" every time — repetitive, unnecessary friction.
- Appearance > Themes → "View Site" The natural next step after installing or activating a theme is to preview the front end. At that moment the admin is on the Themes page and will almost certainly want to return to it. Opening in the same tab discards that context unnecessarily.
Why target="_blank" is appropriate here
Unlike content-area links — where enforcing target="_blank" is debated on accessibility grounds — these are admin UI controls whose sole purpose is side-by-side verification. The intent is always "let me check the front end while staying in the admin."
Proposed fix
Add target="_blank" rel="noopener noreferrer" to:
1.The view-site node in wp_admin_bar_site_menu() (wp-includes/admin-bar.php) via its meta array
2.The "View Site" link in the Gutenberg Themes page UI
Both changes are small and low-risk, but remove daily friction for every WordPress admin.
Attachments (3)
Change History (11)
#3
@
5 weeks ago
Tested patch. Both admin bar "Visit Site" and Themes page "View Site" links now correctly open in new tabs using target="_blank" and rel="noopener noreferrer".
Verified the HTML and tested user workflows. No console errors or functionality issues. Everything working as expected.
#4
@
5 weeks ago
- Focuses accessibility added
- Keywords close target-blank added
these are admin UI controls whose sole purpose is side-by-side verification. The intent is always "let me check the front end while staying in the admin."
Even if side-by-side viewing is the purpose for the majority of the time, that is not always the case for these links to the front page.
The natural next step after installing or activating a theme is to preview the front end. At that moment the admin is on the Themes page and will almost certainly want to return to it.
With Live Preview (Customizer or Site Editor), hopefully people would check whether they want the theme before activating it.
If any of the links are worth opening in a new tab, they would need clear indicators—both visual and spoken by a screen reader—that they open differently.
#5
@
4 weeks ago
Thank you for the feedback. Updated the patch to include visual and screen reader indicators:
- Added dashicons-external icon (aria-hidden="true") as a visual indicator
- Added screen-reader-text span with "(opens in a new tab)" for screen readers
#6
@
4 weeks ago
they must right-click and choose "Open in new tab" every time — repetitive, unnecessary friction.
I woulld ike to remind there are keyboard modifiers to change the behavior of opening a link, for example:
- Ctrl/Cmd + click: opens a link in a background tab.
- Ctrl/Cmd + Shift + click: opens a link in a foreground tab.
The problem with `target="_blank" is that it takes control of a native browser's behavior and can't be overridden by users.
#7
@
4 weeks ago
That's a fair point. However, the current behavior also makes a choice for the user
— it always opens in the same tab.
For admins who want to keep their admin context while checking the front end, Ctrl+click is a workaround rather than an intentional design.
Not all users are aware of keyboard modifiers.
#8
@
4 weeks ago
- Milestone Awaiting Review
- Resolution → wontfix
- Status new → closed
I agree with both @sabernhardt and @afercia that this is best left for users to choose to open links in additional tabs.
It has been a long term project within WordPress to remove _target="blank" from links in the dashboard in order to leave the decision as to whether a link opens in the same or a new tab to the users.
The context menu and keyboard modifiers provide users with the choice to open a link in a new tab, new window or private/incognito window. The same is not true for links that open in the same tab (tested in Firefox) so setting these links to open in a new tab by default would reduce a users choice rather than increase it.
I've closed this ticket as unplanned.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In wp-includes/admin-bar.php:
Also in wp-admin/themes.php: