mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 18:32:23 +01:00
Accessibility: Media: Make the toolbar and inline uploader visual order always match the DOM order.
Depending on the specific media view, the media UI elements are placed in a different visual order. This change makes sure their visual order always matches the DOM order. Propos syhc, audrasjb, afercia. See #37188. Fixes #48403. Built from https://develop.svn.wordpress.org/trunk@47217 git-svn-id: http://core.svn.wordpress.org/trunk@47017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f454fc8165
commit
f2edcb4421
@ -8037,17 +8037,25 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For accessibility reasons, place the Inline Uploader before other sections.
|
* In the grid mode (the Media Library), place the Inline Uploader before
|
||||||
* This way, in the Media Library, it's right after the Add New button, see ticket #37188.
|
* other sections so that the visual order and the DOM order match. This way,
|
||||||
|
* the Inline Uploader in the Media Library is right after the "Add New"
|
||||||
|
* button, see ticket #37188.
|
||||||
*/
|
*/
|
||||||
this.createUploader();
|
if ( this.controller.isModeActive( 'grid' ) ) {
|
||||||
|
this.createUploader();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a multi-purpose toolbar. Used as main toolbar in the Media Library
|
||||||
|
* and also for other things, for example the "Drag and drop to reorder" and
|
||||||
|
* "Suggested dimensions" info in the media modal.
|
||||||
|
*/
|
||||||
|
this.createToolbar();
|
||||||
|
} else {
|
||||||
|
this.createToolbar();
|
||||||
|
this.createUploader();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Create a multi-purpose toolbar. Used as main toolbar in the Media Library
|
|
||||||
* and also for other things, for example the "Drag and drop to reorder" and
|
|
||||||
* "Suggested dimensions" info in the media modal.
|
|
||||||
*/
|
|
||||||
this.createToolbar();
|
|
||||||
|
|
||||||
// Add a heading before the attachments list.
|
// Add a heading before the attachments list.
|
||||||
this.createAttachmentsHeading();
|
this.createAttachmentsHeading();
|
||||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4-alpha-47216';
|
$wp_version = '5.4-alpha-47217';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user