Make WordPress Core

Opened 12 years ago

Last modified 5 months ago

#23432 accepted task (blessed)

Review usage of target="_blank" in the admin

Reported by: theadityajain's profile theadityajain Owned by: sabernhardt's profile sabernhardt
Milestone: Future Release Priority: normal
Severity: normal Version: 3.2
Component: Administration Keywords: target-blank a11y-task
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 12 years ago.
33303.patch (1.2 KB) - added by juhise 9 years ago.
patch file for user-edit.php

Download all attachments as: .zip

Change History (72)

@theadityajain
12 years ago

#3 @SergeyBiryukov
12 years ago

  • Keywords ui-focus added

#4 @toscho
12 years ago

  • Cc info@… added

#5 follow-up: @garthkoyle
11 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.

#6 @helen
11 years ago

  • Milestone Awaiting Review deleted

#7 in reply to: ↑ 5 @SergeyBiryukov
11 years 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.

#8 @SergeyBiryukov
11 years ago

  • Milestone set to Awaiting Review

#10 @DrewAPicture
10 years ago

  • Focuses accessibility added

#11 @joedolson
10 years 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.

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


9 years ago

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


9 years ago

#15 @davidakennedy
9 years ago

#31363 was marked as a duplicate.

#16 @davidakennedy
9 years ago

#31386 was marked as a duplicate.

#17 @DrewAPicture
9 years ago

#31386 was marked as a duplicate.

#18 @Ankit K Gupta
9 years 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.

#19 @SergeyBiryukov
9 years ago

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

@juhise
9 years ago

patch file for user-edit.php

#20 @juhise
9 years ago

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

#21 @atomicjack
9 years ago

#33303 was marked as a duplicate.

#22 @netweb
9 years 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";

#23 @swissspidy
9 years ago

#35244 was marked as a duplicate.

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


8 years ago

#25 @rianrietveld
8 years ago

This ticket needs to be broken down in into multiple tickets with this ticket as a tracker.
The a11y team has set this as a goal for 4.6 but me probably need more time then that.
We also have to look at the "saving settings” issue and make a uniform decision about that.

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


8 years ago

#27 @afercia
8 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from minor to normal

Discussed a bit during today's accessibility bug scrub, thinking this is something that should definitely be done but not sure well have time in this release cycle. Setting to future release for now.

Version 0, edited 8 years ago by afercia (next)

This ticket was mentioned in Slack in #core-editor by afercia. View the logs.


8 years ago

This ticket was mentioned in Slack in #core by mrwweb. View the logs.


8 years ago

#30 @afercia
8 years ago

#34727 was marked as a duplicate.

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


8 years ago

#32 @rianrietveld
8 years ago

  • Owner set to rianrietveld
  • Status changed from reopened to assigned

#33 @rianrietveld
8 years ago

Investigated the use of target="_blank" in the admin today.

Almost all target="_blank" links are in the help-wrap at the top of almost each admin-view.
And if no permalink structure is set, a button Change permalink is shown with a target=_blank link to the set permalink page.

I left out the media and press-this for this review.

Most links can be changed easily by just removing the target.
On other pages an alert needs to be set for possible unsaved data when a user leaves, as done in the edit.php, but that can be done later.

The (old) link functionality is still in core, you can activate it with the the plugin Link Manager, which has 100,000+ active installs. This also has "_blank in the help-wrap.

The plan is to open new tickets per functionality (like users/comments/network) and make patches for those. We can discuss per ticket what needs to go and what can stay. But for the links in help: I think all blank can go.

A few questions:

  • Then there is the preview button. Should this open in a new window or in the same? I prefer stay with a visual warning.
  • Some functionality, like the menus and the old link functionality, gives the user the option to add a link target="_blank". Maybe we should reconsider this? Related to this is #36809

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


8 years ago

#35 @rianrietveld
8 years ago

  • Milestone changed from Future Release to 4.7

#36 @rianrietveld
8 years ago

Patches done so far:

  • #38145 Remove target="_blank" from help tab in serveral Admin screens
  • #38143 Remove target="_blank" from help tab option files for settings in the Admin
  • #38141 Remove target="_blank" from help tab custom-background/custom-header
  • #38140 Remove target="_blank" from help tab comment/comment-edit
  • #38159 Remove target="_blank" from help tab in Network screens in the Admin
  • #38215 Remove target="_blank" from help tab in plugin, theme and update screens in the Admin
  • #38217 Remove target="_blank" from help tab in user and widget Admin screens
Last edited 8 years ago by rianrietveld (previous) (diff)

This ticket was mentioned in Slack in #core by aaroncampbell. View the logs.


8 years ago

#38 follow-up: @celloexpressions
8 years ago

In response to the questions in 33:

  • The preview button should open in a new tab by default since it's generally intended for back-and-forth (live preview is a better solution, which we'll have an option for eventually). Visual and/or screen-reader-text indicators of that would help. We have to remember that a very large number of users don't know how to open links in a new tab.
  • I would be in favor of removing the link target option for nav menus. However, we should probably wait until custom nav menu item properties are possible, so that a plugin could bring that functionality back. See #18584.

#39 in reply to: ↑ 38 @rianrietveld
8 years ago

Replying to celloexpressions:

In response to the questions in 33:

  • The preview button should open in a new tab by default since it's generally intended for back-and-forth (live preview is a better solution, which we'll have an option for eventually). Visual and/or screen-reader-text indicators of that would help. We have to remember that a very large number of users don't know how to open links in a new tab.
  • I would be in favor of removing the link target option for nav menus. However, we should probably wait until custom nav menu item properties are possible, so that a plugin could bring that functionality back. See #18584.

Thanks @celloexpressions for looking into this. I agree with you.
The plan is to remove the targets first from the help tabs (and text links) and then find a good solution for the rest.

#40 @afercia
8 years ago

In 38718:

Accessibility: Remove target=_blank from the comment/edit-comments help tabs links.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38140. See #23432.

#41 @afercia
8 years ago

In 38719:

Accessibility: Remove target=_blank from the old custom background/header help tabs links.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38141. See #23432.

#42 @afercia
8 years ago

In 38720:

Accessibility: Remove target=_blank from the Settings screens help tabs links.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38143. See #23432.

#43 @afercia
8 years ago

In 38721:

Accessibility: Remove target=_blank from the Network screens help tabs links.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38159. See #23432.

#44 @afercia
8 years ago

In 38722:

Accessibility: Remove target=_blank from the Plugins, Themes, Media, Update, and Tools screens help tabs links.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38215. See #23432.

#45 @afercia
8 years ago

In 38723:

Accessibility: Remove target=_blank from the Users and Widgets screens help tabs links.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38217. See #23432.

#46 @afercia
8 years ago

In 38725:

Accessibility: Remove target=_blank from the help tab links on several admin screens.

Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38145. See #23432.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 years ago

#48 @jorbin
8 years ago

  • Type changed from enhancement to task (blessed)

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


8 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 years ago

#51 @afercia
8 years ago

  • Keywords target-blank added; has-patch removed
  • Milestone changed from 4.7 to Future Release

Moving out from the release since this is now a task and used as tracking ticket. New, specific tickets for specific issues will have the target-blank keyword: https://core.trac.wordpress.org/query?keywords=~target-blank

#52 @afercia
8 years ago

In 39019:

Accessibility: Remove target=_blank from the help tab links in network.php.

Stop taking control of users' browsers.

Props wolly.
Fixes #38572. See #23432.

#53 @afercia
8 years ago

Just to highlight this new pattern landing in the Customizer in WP 4.7:

https://cldup.com/MfE3KHD-Tf.jpg

#54 @afercia
7 years ago

Worth noting the updated News dashboard widget merged in [40607] that is now able to display "Nearby Events", has just introduced a new icon to indicate external links.

Whether links open in a new window or not, I'd tend to think this icon should be used only to visually indicate the link points to an external resource.

Instead, target="_blank" should be communicated by other means, with a screen reader text as done for example in [40422] and [38829]. Any thoughts welcome!

https://cldup.com/wFhJDJifmv.png

As far as I know, this icon is used in only one other place: when reordering widgets in the customizer:

https://cldup.com/rv9T51prBt.png

Last edited 6 years ago by afercia (previous) (diff)

This ticket was mentioned in Slack in #core by howdy_mcgee. View the logs.


7 years ago

#56 @rianrietveld
7 years ago

  • Keywords a11y-task added

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


7 years ago

#58 @joedolson
7 years ago

In order to move forward on this, we need to come to agreement on how links that open in new windows are presented in the UI. There are two problems to solve: the first is not opening links in new windows unless necessary, second is to appropriately communicate that a link will open in a new window if it is necessary.

Links that open in new windows should include an indicator that shows they'll open in a new window that's available to both sighted and non-visual users.

#59 @johnbillion
7 years ago

#42529 was marked as a duplicate.

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


6 years ago

#61 @garrett-eclipse
6 years ago

#46323 was marked as a duplicate.

#62 @rianrietveld
5 years ago

  • Owner rianrietveld deleted

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


3 years ago

#64 @audrasjb
3 years ago

In 52646:

Media: Remove target blank attribute from media uploader edit links.

This change removes a dispensable target blank attribute from Edit links displayed in the asynchronous file uploader.

Follow-up to [22755].

Props kebbet, SergeyBiryukov.
Fixes #54945.
See #23432.

#65 @generosus
2 years ago

#56571 was marked as a duplicate.

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


23 months ago

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


21 months ago

#68 @sabernhardt
11 months ago

  • Owner set to sabernhardt
  • Status changed from assigned to accepted

#69 @jwgoedert
5 months ago

@sabernhardt Is this still being explored? I spent some time searching through core and found quite a few instances but many of them had disclaimers or seeming remedies. Interested in contributing to this or related tickets if that would be of value! (new to the accessibility WP world)

#70 @generosus
5 months ago

Hey Guys,

How do I get out from receiving notifications for this topic?

I have disabled everything but still keep getting them. There’s an open ticket requesting a fix. It’s been around for a while.

Details: https://wordpress.org/support/topic/bug-cannot-disable-email-notifications-from-wordpress-trac/

Above affects many. Help appreciated.

Thank you!

Note: See TracTickets for help on using tickets.