diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
index 3a3142ab50c..f95cbfee081 100644
|
|
AttachmentsBrowser = View.extend({ |
3772 | 3772 | this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); |
3773 | 3773 | this.controller.on( 'edit:selection', this.editSelection ); |
3774 | 3774 | this.createToolbar(); |
| 3775 | // In the Media Library, the sidebar is used to display errors before the attachments grid. |
| 3776 | if ( this.options.sidebar && 'errors' === this.options.sidebar ) { |
| 3777 | this.createSidebar(); |
| 3778 | } |
3775 | 3779 | this.createUploader(); |
3776 | 3780 | this.createAttachments(); |
3777 | | if ( this.options.sidebar ) { |
| 3781 | // For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909. |
| 3782 | if ( this.options.sidebar && 'errors' !== this.options.sidebar ) { |
3778 | 3783 | this.createSidebar(); |
3779 | 3784 | } |
3780 | 3785 | this.updateContent(); |
diff --git src/wp-includes/js/media/views/attachments/browser.js src/wp-includes/js/media/views/attachments/browser.js
index 6bb61e252e6..fbcde100ce4 100644
|
|
AttachmentsBrowser = View.extend({ |
41 | 41 | this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); |
42 | 42 | this.controller.on( 'edit:selection', this.editSelection ); |
43 | 43 | this.createToolbar(); |
| 44 | // In the Media Library, the sidebar is used to display errors before the attachments grid. |
| 45 | if ( 'library' === this.options.state ) { |
| 46 | this.createSidebar(); |
| 47 | } |
44 | 48 | this.createUploader(); |
45 | 49 | this.createAttachments(); |
46 | | if ( this.options.sidebar ) { |
| 50 | // For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909. |
| 51 | if ( 'library' !== this.options.state ) { |
47 | 52 | this.createSidebar(); |
48 | 53 | } |
49 | 54 | this.updateContent(); |