[wp-trac] [WordPress Trac] #63984: Assess if the tabpanels in the media modals should receive focus
WordPress Trac
noreply at wordpress.org
Thu Feb 12 02:51:57 UTC 2026
#63984: Assess if the tabpanels in the media modals should receive focus
-------------------------------------+----------------------------
Reporter: alh0319 | Owner: joedolson
Type: enhancement | Status: accepted
Priority: normal | Milestone: 7.0
Component: Media | Version: 5.3
Severity: normal | Resolution:
Keywords: has-patch has-test-info | Focuses: accessibility
-------------------------------------+----------------------------
Comment (by alh0319):
I re-examined the Add Media dialog, and I think the first element in every
tab panel is focusable. Visually, there is a heading, but the heading is
not actually in the tab panel; it appears before it in the DOM.
For example, this is the contents of the Add Media panel:
{{{
<div class="media-frame-tab-panel" role="tabpanel" aria-labelledby="menu-
item-insert" tabindex="0">
<div class="media-frame-router">
<div role="tablist" aria-orientation="horizontal" class
="media-router">
<button type="button" role="tab" class="media-
menu-item" id="menu-item-upload" aria-selected="false"
tabindex="-1">Upload files</button>
<button type="button" role="tab" class="media-
menu-item active" id="menu-item-browse" aria-selected="true">Media
Library</button>
</div>
</div>
<div class="media-frame-content" data-columns="5" role="tabpanel"
aria-labelledby="menu-item-browse" tabindex="0">
<div class="attachments-browser has-load-more"><div class
="media-toolbar"><div class="media-toolbar-secondary">
<h2 class="media-attachments-filter-
heading">Filter media</h2>
[...]
}}}
Most of the panels (Add media, Create gallery, Create audio playlist,
Create video playlist, Featured image) have a set of nested tab controls
as the first element in the panel.
The insert from URL tab has an input as the first element in the panel.
Within the nested tabs, there is a heading that would be skipped, but I
agree with @joedolson that the heading is redundant or trivial, as it is
covered by the label of the first focusable element in the panel.
I agree that the tab stop should be removed from both the parent tabpanel
and the nested tab panels.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63984#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list