[wp-trac] [WordPress Trac] #63238: Remove `target="_blank"` from Browser Uploader Link
WordPress Trac
noreply at wordpress.org
Thu Oct 30 22:30:35 UTC 2025
#63238: Remove `target="_blank"` from Browser Uploader Link
-------------------------------------+-------------------------------------
Reporter: dilipbheda | Owner: joedolson
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.9
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has- | Focuses: accessibility,
screenshots target-blank commit | administration
-------------------------------------+-------------------------------------
Changes (by joedolson):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"61099" 61099]:
{{{
#!CommitTicketReference repository="" revision="61099"
Media: A11y: Switch uploader toggle to `button` and set focus.
The control to switch between the browser uploader and the default
uploader used a link with `target="_blank"`, but was driven by scripts. In
a no-js context, this meant that the link could be used to open the
browser uploader in a new tab. This is unnecessary, however, because the
default uploader is not rendered when JS is not available.
On switching uploaders, browser focus was lost.
For more predictable keyboard and screen reader behavior, switch the media
uploader toggle to a `button` element and set focus to the upload button
in the new context.
Props dilipbheda, sabernhardt, rollybueno, westonruter, joedolson.
Fixes #63238.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63238#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list