Skip to content

Remove "Open in new window" link option #4571

Closed

Description

@ellatrix

This was added in #2204 (issue), #2628 (PR).

It was hidden in WordPress 4.5, see https://make.wordpress.org/core/2016/03/28/the-editor-in-wordpress-4-5/#comment-29560.

Adding the target="_blank" attribute is considered bad practice for post/articles. Unless you're making a web app where this behaviour can be crucial, the use of it should be discouraged so that the user/reader of your site can chose what to do for themselves. I personally hate using sites that add this to their links so you'll stay on their site longer or come back to it. On mobile devices this can be even more frustrating. It breaks the history of a tab.

We shouldn't easily allow hijacking default link behaviour with a simple toggle. Changing default behaviour should be well thought out, and this UI does not encourage that.

Interesting article: https://css-tricks.com/use-target_blank/

Conclusion: when it is a good reason to use target="_blank", it is either not about links in posts/articles on sites (but web apps of some kind) or you're dealing with a really special site where it would be better to filter all links form the post content. There seems to be absolutely no reason to have UI in WordPress for it, and if you really, really, really want to add the attribute, people are free to edit the HTML or install a plugin for it.

Some other interesting links from https://make.wordpress.org/core/2016/03/28/the-editor-in-wordpress-4-5/#comment-29566:

Activity

  1. added
    [Focus] Accessibility (a11y)
    on Jan 18, 2018
  2. youknowriad commented on Jan 18, 2018

    @youknowriad
    Contributor

    related #4450

  3. karmatosed commented on Jan 18, 2018

    @karmatosed
    Member

    I would +1 to remove it.

  4. braders commented on Jan 19, 2018

    @braders

    Also related #4499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Focus] Accessibility (a11y)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions