[wp-trac] [WordPress Trac] #63238: Remove `target="_blank"` from Browser Uploader Link

WordPress Trac noreply at wordpress.org
Sun Oct 12 05:43:35 UTC 2025


#63238: Remove `target="_blank"` from Browser Uploader Link
-------------------------------------+-------------------------------------
 Reporter:  dilipbheda               |       Owner:  joedolson
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  6.9
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-           |     Focuses:  accessibility,
  screenshots target-blank           |  administration
-------------------------------------+-------------------------------------

Comment (by sabernhardt):

 Well, changing the element with [attachment:"63238.button-element.diff"]
 should be easier for us. I think the script in [attachment:"63238.button-
 role.diff"] could need editing to work with the spacebar in all browsers,
 and it would require more testing.

 However, the `role` option should be more backward-compatible.
 - It would keep the well-established strings (see
 [https://translate.wordpress.org/projects/wp/dev/admin/en-
 ca/default/?filters%5Bterm%5D=multi-file+uploader both strings, with their
 translations]). Of course, untranslated admin strings are less of a
 problem than user-facing strings, and these might be labeled as 'fuzzy'.
 - All of the `href="#"` string's translations include `<a href="#">`
 today, but if that changes, it would fall back to link semantics and
 should continue to behave as it does now.
 - If someone had a reason to create a custom replacement of 'plupload-
 handlers', then it should still function when people click the link or use
 the Enter key (without needing to update the element name in their
 script). Most plugins in the
 [https://wpdirectory.net/search/01K7BC313ZBWRTNYAPRXGZ4JZ5 directory
 search results] enqueue 'plupload-handlers' on its own or as a dependency.
 Gmedia Photo Gallery is the only plugin I found to dequeue it and enqueue
 another script, but that plugin apparently does not affect these switcher
 links within the core media library.
 - If some people actually have a desire to open the one link in a new tab,
 the `role` would continue to allow that.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63238#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list