WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 7 days ago

#23432 reopened enhancement

Review usage of target="_blank" in the admin

Reported by: theadityajain Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.2
Component: Administration Keywords: has-patch
Focuses: ui, accessibility Cc:

Description

Some links in the Setting Pages (General, Discussion, Permalink) pages open in same window, which sometime can be awful.
While the users can press cmd/ctrl + click and click the link to open it in new tab but If the user does not open the link in new window, options (which are not saved) will be lost and one have to go through them again.
Also links in the Edit Profile page and all the links in the help tab open in new window except a few.(so it is possible that users may just click it thinking them to alike other links which open in new window)
So a consistency will be there and ux can be a little better.

Attachments (2)

23432.diff (5.5 KB) - added by theadityajain 3 years ago.
33303.patch (1.2 KB) - added by juhise 3 weeks ago.
patch file for user-edit.php

Download all attachments as: .zip

Change History (24)

@theadityajain3 years ago

comment:3 @SergeyBiryukov3 years ago

  • Keywords ui-focus added

comment:4 @toscho3 years ago

  • Cc info@… added

comment:5 follow-up: @garthkoyle2 years ago

  • Keywords close added
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from 3.5.1 to trunk

I reviewed all the links in the Settings, Writing, Reading, Discussion, Media and Permalinks pages in BOTH 3.5.1 and 3.7-alpha-24822. No links were found to open in another tab/window so the links are consistent.

comment:6 @helen2 years ago

  • Milestone Awaiting Review deleted

comment:7 in reply to: ↑ 5 @SergeyBiryukov21 months ago

  • Keywords close removed
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from trunk to 3.2

Replying to garthkoyle:

I reviewed all the links in the Settings, Writing, Reading, Discussion, Media and Permalinks pages in BOTH 3.5.1 and 3.7-alpha-24822. No links were found to open in another tab/window so the links are consistent.

As mentioned in the ticket description, the link on Profile screen opens in a new window, as well as almost all the links in Help tab.

We should probably review all the Codex links. Whether they should open in a new window or not, I guess it would make sense to be consistent.

comment:8 @SergeyBiryukov21 months ago

  • Milestone set to Awaiting Review

comment:10 @DrewAPicture6 months ago

  • Focuses accessibility added

comment:11 @joedolson6 months ago

Mixed feelings on this question; in general, links should not open in new tabs/windows without informing the user, which would add a lot of noise to the screen. However, it is true that if a user opens the link in the same window without saving their settings, they can undo whatever work they were doing.

My vote would be in favor of using heartbeat to detect whether there are pending changes, or something to that effect, and throwing a warning if a user attempts to move to another page without saving changes, similar to what currently exists in post saving.

comment:13 @slackbot5 weeks ago

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.

comment:14 @slackbot4 weeks ago

This ticket was mentioned in Slack in #accessibility by rianrietveld. View the logs.

comment:15 @davidakennedy4 weeks ago

#31363 was marked as a duplicate.

comment:16 @davidakennedy4 weeks ago

#31386 was marked as a duplicate.

comment:17 @DrewAPicture4 weeks ago

#31386 was marked as a duplicate.

comment:18 @Ankit K Gupta3 weeks ago

I think, Open the links in new tab is not good for point of user experience. If user want to open links in new tab then they have option to use Ctrl+click of keyboard.
If we give target="_blank" it means we are forcing user to open the link in new tab even if he doesn't want.
Also, it will increase the numbers of tabs in browser.

comment:19 @SergeyBiryukov3 weeks ago

  • Summary changed from Links in Setting pages to open in new window to Review usage of target="_blank" in the admin

@juhise3 weeks ago

patch file for user-edit.php

comment:20 @juhise3 weeks ago

Added patch for making all codex link consistent throughout the Admin.

comment:21 @atomicjack3 weeks ago

#33303 was marked as a duplicate.

comment:22 @netweb7 days ago

Here's another, if your permalinks are not pretty you'll see a button next to the post permalink "Change Permalinks"
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/post.php#L1292

1292:			$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
Note: See TracTickets for help on using tickets.