Ticket #47458: 47458.2.diff
File 47458.2.diff, 3.5 KB (added by , 5 years ago) |
---|
-
src/js/media/views/attachment/details.js
18 18 className: 'attachment-details', 19 19 template: wp.template('attachment-details'), 20 20 21 attributes: function() { 22 return { 23 'tabIndex': 0, 24 'data-id': this.model.get( 'id' ) 25 }; 26 }, 21 /* 22 * Reset all the attributes inherited from Attachment, including role=checkbox, 23 * tabindex, etc. that are inappropriate here. See #47458 and [30483] / #30390. 24 */ 25 attributes: {}, 27 26 28 27 events: { 29 28 'change [data-setting]': 'updateSetting', -
src/js/media/views/frame/edit-attachments.js
80 80 // Initialize modal container view. 81 81 if ( this.options.modal ) { 82 82 this.modal = new wp.media.view.Modal({ 83 controller: this, 84 title: this.options.title 83 controller: this, 84 title: this.options.title, 85 hasCloseButton: false 85 86 }); 86 87 87 88 this.modal.on( 'open', _.bind( function () { -
src/js/media/views/modal.js
26 26 27 27 initialize: function() { 28 28 _.defaults( this.options, { 29 container: document.body, 30 title: '', 31 propagate: true 29 container: document.body, 30 title: '', 31 propagate: true, 32 hasCloseButton: true 32 33 }); 33 34 34 35 this.focusManager = new wp.media.view.FocusManager({ … … 40 41 */ 41 42 prepare: function() { 42 43 return { 43 title: this.options.title 44 title: this.options.title, 45 hasCloseButton: this.options.hasCloseButton 44 46 }; 45 47 }, 46 48 -
src/wp-includes/media-template.php
188 188 <?php // Template for the media modal. ?> 189 189 <script type="text/html" id="tmpl-media-modal"> 190 190 <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 <# } #> 192 194 <div class="media-modal-content"></div> 193 195 </div> 194 196 <div class="media-modal-backdrop"></div> … … 323 325 <div class="edit-media-header"> 324 326 <button class="left dashicons <# if ( ! data.hasPrevious ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Previous' ); ?></span></button> 325 327 <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> 326 329 </div> 327 330 <div class="media-frame-title"></div> 328 331 <div class="media-frame-content"></div>