Make WordPress Core


Ignore:
Timestamp:
09/19/2025 08:52:52 PM (12 months ago)
Author:
joedolson
Message:

Editor: A11y: Set aria-haspopup on Add Media button.

Add the aria-haspopup attribute and aria-controls on the Add Media button in the classic editor, so that screen reader users are notified about the behavior of the button.

Props alh0319, rishabhwp, joedolson.
Fixes #63973.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r60266 r60786  
    196196        <?php // Template for the media modal. ?>
    197197        <script type="text/html" id="tmpl-media-modal">
    198                 <div tabindex="0" class="<?php echo $class; ?>" role="dialog" aria-labelledby="media-frame-title">
     198                <div id="wp-media-modal" tabindex="0" class="<?php echo $class; ?>" role="dialog" aria-labelledby="media-frame-title">
    199199                        <# if ( data.hasCloseButton ) { #>
    200200                                <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text">
Note: See TracChangeset for help on using the changeset viewer.