WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/19/2019 04:55:01 AM (14 months ago)
Author:
SergeyBiryukov
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.

Props afercia.
Merges [45506] to the 5.2 branch.
Fixes #47458.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-includes/media-template.php

    r45335 r45849  
    196196    <script type="text/html" id="tmpl-media-modal">
    197197        <div tabindex="0" class="<?php echo $class; ?>">
    198             <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>
     198            <# if ( data.hasCloseButton ) { #>
     199                <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button>
     200            <# } #>
    199201            <div class="media-modal-content"></div>
    200202        </div>
     
    320322            <button class="left dashicons <# if ( ! data.hasPrevious ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Edit previous media item' ); ?></span></button>
    321323            <button class="right dashicons <# if ( ! data.hasNext ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Edit next media item' ); ?></span></button>
     324            <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button>
    322325        </div>
    323326        <div class="media-frame-title"></div>
Note: See TracChangeset for help on using the changeset viewer.