Accessibility: Improve focus management in the Media Views.
- keeps focus management only where necessary to avoid focus losses - removes focus management where a specific user workflow was assumed - makes the "Attachment Details" navigation buttons really disabled when there are no next or previous attachments - adds inline comments to clarify all the usages of focus() Fixes #43169. Built from https://develop.svn.wordpress.org/trunk@45524 git-svn-id: http://core.svn.wordpress.org/trunk@45335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -323,8 +323,8 @@ function wp_print_media_templates() {
|
||||
<?php // Template for the Attachment Details layout in the media browser. ?>
|
||||
<script type="text/html" id="tmpl-edit-attachment-frame">
|
||||
<div class="edit-media-header">
|
||||
<button class="left dashicons <# if ( ! data.hasPrevious ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Previous' ); ?></span></button>
|
||||
<button class="right dashicons <# if ( ! data.hasNext ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Next' ); ?></span></button>
|
||||
<button class="left dashicons"<# if ( ! data.hasPrevious ) { #> disabled<# } #>><span class="screen-reader-text"><?php _e( 'Edit previous media item' ); ?></span></button>
|
||||
<button class="right dashicons"<# if ( ! data.hasNext ) { #> disabled<# } #>><span class="screen-reader-text"><?php _e( 'Edit next media item' ); ?></span></button>
|
||||
<button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></span></button>
|
||||
</div>
|
||||
<div class="media-frame-title"></div>
|
||||
|
||||
Reference in New Issue
Block a user