Media Grid:
* Use a `media.view.Label` instance in the toolbar for the screen reader text for the "all" dropdown. * Adjust the spinner's priority. Fixes #29026. Built from https://develop.svn.wordpress.org/trunk@29438 git-svn-id: http://core.svn.wordpress.org/trunk@29216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ccd0499d96
commit
8c96874742
|
@ -5743,6 +5743,10 @@
|
|||
}).render() );
|
||||
}
|
||||
|
||||
this.toolbar.set( 'spinner', new media.view.Spinner({
|
||||
priority: -60
|
||||
}) );
|
||||
|
||||
filters = this.options.filters;
|
||||
if ( 'uploaded' === filters ) {
|
||||
FiltersConstructor = media.view.AttachmentFilters.Uploaded;
|
||||
|
@ -5751,20 +5755,22 @@
|
|||
}
|
||||
|
||||
if ( FiltersConstructor ) {
|
||||
// "FiltersConstructor" will return a <select>, need to render
|
||||
// screen reader text before
|
||||
this.toolbar.set( 'filtersLabel', new media.view.Label({
|
||||
value: l10n.filterByType,
|
||||
attributes: {
|
||||
'for': 'media-attachment-filters'
|
||||
},
|
||||
priority: -80
|
||||
}).render() );
|
||||
this.toolbar.set( 'filters', new FiltersConstructor({
|
||||
controller: this.controller,
|
||||
model: this.collection.props,
|
||||
priority: -80
|
||||
}).render() );
|
||||
|
||||
screenReaderText = $( '<label class="screen-reader-text" for="media-attachment-filters">' + l10n.select + '</label>' );
|
||||
this.toolbar.get( 'filters' ).$el.before( screenReaderText );
|
||||
}
|
||||
|
||||
this.toolbar.set( 'spinner', new media.view.Spinner({
|
||||
priority: -70
|
||||
}) );
|
||||
|
||||
if ( this.options.search ) {
|
||||
// Search is an input, screen reader text needs to be rendered before
|
||||
this.toolbar.set( 'searchLabel', new media.view.Label({
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2941,6 +2941,7 @@ function wp_enqueue_media( $args = array() ) {
|
|||
'deletePermanently' => __( 'Delete Permanently' ),
|
||||
'apply' => __( 'Apply' ),
|
||||
'filterByDate' => __( 'Filter by date' ),
|
||||
'filterByType' => __( 'Filter by type' ),
|
||||
'searchMediaLabel' => __( 'Search Media' ),
|
||||
|
||||
// Library Details
|
||||
|
|
Loading…
Reference in New Issue