mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Media Grid: add screen reader text in a subview on the toolbar, a media.view.Label
instance before media.view.DateFilter
.
See #29026. Built from https://develop.svn.wordpress.org/trunk@29435 git-svn-id: http://core.svn.wordpress.org/trunk@29213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3f17e7040e
commit
8593f7b5e9
@ -5716,15 +5716,26 @@
|
||||
className: 'view-switch media-grid-view-switch',
|
||||
template: media.template( 'media-library-view-switcher')
|
||||
});
|
||||
|
||||
this.toolbar.set( 'libraryViewSwitcher', new LibraryViewSwitcher({
|
||||
controller: this.controller,
|
||||
priority: -90
|
||||
}).render() );
|
||||
|
||||
// BulkSelection is a <div> with subviews, including screen reader text
|
||||
this.toolbar.set( 'bulkSelection', new media.view.BulkSelection({
|
||||
controller: this.controller,
|
||||
priority: -70
|
||||
}).render() );
|
||||
|
||||
// DateFilter is a <select>, screen reader text needs to be rendered before
|
||||
this.toolbar.set( 'dateFilterLabel', new media.view.Label({
|
||||
value: l10n.filterByDate,
|
||||
attributes: {
|
||||
'for': 'media-attachment-date-filters'
|
||||
},
|
||||
priority: -75
|
||||
}).render() );
|
||||
this.toolbar.set( 'dateFilter', new media.view.DateFilter({
|
||||
controller: this.controller,
|
||||
model: this.collection.props,
|
||||
@ -6583,6 +6594,8 @@
|
||||
|
||||
render: function() {
|
||||
this.$el.html( this.value );
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
|
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
@ -2940,6 +2940,7 @@ function wp_enqueue_media( $args = array() ) {
|
||||
'bulkActionsLabel' => __( 'Select bulk action' ),
|
||||
'deletePermanently' => __( 'Delete Permanently' ),
|
||||
'apply' => __( 'Apply' ),
|
||||
'filterByDate' => __( 'Filter by date' ),
|
||||
|
||||
// Library Details
|
||||
'attachmentDetails' => __( 'Attachment Details' ),
|
||||
|
Loading…
Reference in New Issue
Block a user