Make WordPress Core

Ticket #48403: 48403.1.diff

File 48403.1.diff, 1.1 KB (added by audrasjb, 3 years ago)

Media: Accessibility: Move the inline uploader right after the toolbar to ensure the media modal visual order matches the source order.

  • src/js/media/views/attachments/browser.js

    diff --git a/src/js/media/views/attachments/browser.js b/src/js/media/views/attachments/browser.js
    index 4a4289149d..ad8be5b34d 100644
    a b AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro 
    4848                        this.createSidebar();
    4949                }
    5050
    51                 /*
    52                  * For accessibility reasons, place the Inline Uploader before other sections.
    53                  * This way, in the Media Library, it's right after the Add New button, see ticket #37188.
    54                  */
    55                 this.createUploader();
    56 
    5751                /*
    5852                 * Create a multi-purpose toolbar. Used as main toolbar in the Media Library
    5953                 * and also for other things, for example the "Drag and drop to reorder" and
    AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro 
    6155                 */
    6256                this.createToolbar();
    6357
     58                // For accessibility reasons, place the inline uploader right after the toolbar, see ticket #48403.
     59                this.createUploader();
     60
    6461                // Add a heading before the attachments list.
    6562                this.createAttachmentsHeading();
    6663