diff --git a/src/js/media/views/attachment/details.js b/src/js/media/views/attachment/details.js index 885948b364..fe12487548 100644 --- a/src/js/media/views/attachment/details.js +++ b/src/js/media/views/attachment/details.js @@ -18,12 +18,11 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp className: 'attachment-details', template: wp.template('attachment-details'), - attributes: function() { - return { - 'tabIndex': 0, - 'data-id': this.model.get( 'id' ) - }; - }, + /* + * Reset all the attributes inherited from Attachment including role=checkbox, + * tabindex, etc., as they are inappropriate for this view. See #47458 and [30483] / #30390. + */ + attributes: {}, events: { 'change [data-setting]': 'updateSetting', diff --git a/src/js/media/views/frame/edit-attachments.js b/src/js/media/views/frame/edit-attachments.js index 469f5db739..0b5d150cd9 100644 --- a/src/js/media/views/frame/edit-attachments.js +++ b/src/js/media/views/frame/edit-attachments.js @@ -80,8 +80,9 @@ EditAttachments = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.EditAtta // Initialize modal container view. if ( this.options.modal ) { this.modal = new wp.media.view.Modal({ - controller: this, - title: this.options.title + controller: this, + title: this.options.title, + hasCloseButton: false }); this.modal.on( 'open', _.bind( function () { diff --git a/src/js/media/views/modal.js b/src/js/media/views/modal.js index 75ffe06d66..aabf2b48d4 100644 --- a/src/js/media/views/modal.js +++ b/src/js/media/views/modal.js @@ -26,9 +26,10 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{ initialize: function() { _.defaults( this.options, { - container: document.body, - title: '', - propagate: true + container: document.body, + title: '', + propagate: true, + hasCloseButton: true }); this.focusManager = new wp.media.view.FocusManager({ @@ -40,7 +41,8 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{ */ prepare: function() { return { - title: this.options.title + title: this.options.title, + hasCloseButton: this.options.hasCloseButton }; }, diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index dd2d67a90c..427ff53b2c 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -188,7 +188,9 @@ function wp_print_media_templates() {