Make WordPress Core


Ignore:
Timestamp:
06/09/2019 03:47:43 PM (6 years ago)
Author:
afercia
Message:

Accessibility: Fix the order of the Previous, Next, and Close buttons in the Attachment Details modal.

Making the visual and DOM order match benefits keyboard users who navigate documents sequentially and expect the focus order to be consistent with the sequential reading order.

Fixes #47458.

File:
1 edited

Legend:

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

    r45499 r45506  
    189189    <script type="text/html" id="tmpl-media-modal">
    190190        <div tabindex="0" class="<?php echo $class; ?>">
    191             <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button>
     191            <# if ( data.hasCloseButton ) { #>
     192                <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button>
     193            <# } #>
    192194            <div class="media-modal-content"></div>
    193195        </div>
     
    324326            <button class="left dashicons <# if ( ! data.hasPrevious ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Previous' ); ?></span></button>
    325327            <button class="right dashicons <# if ( ! data.hasNext ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Next' ); ?></span></button>
     328            <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button>
    326329        </div>
    327330        <div class="media-frame-title"></div>
Note: See TracChangeset for help on using the changeset viewer.