Media Grid: Don't make checkboxes tabbable when in bulk select media grid mode, fixes tabbing in bulk select mode.
Props adamsilverstein. See #28822. Built from https://develop.svn.wordpress.org/trunk@29585 git-svn-id: http://core.svn.wordpress.org/trunk@29359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d5d0b37c35
commit
1335ff3e40
|
@ -4942,7 +4942,8 @@
|
|||
* @param {Backbone.Collection} collection
|
||||
*/
|
||||
select: function( model, collection ) {
|
||||
var selection = this.options.selection;
|
||||
var selection = this.options.selection,
|
||||
controller = this.controller;
|
||||
|
||||
// Check if a selection exists and if it's the collection provided.
|
||||
// If they're not the same collection, bail; we're in another
|
||||
|
@ -4956,9 +4957,12 @@
|
|||
return;
|
||||
}
|
||||
|
||||
// Add 'selected' class to model, set aria-checked to true and make the checkbox tabable.
|
||||
this.$el.addClass( 'selected' ).attr( 'aria-checked', true )
|
||||
.find( '.check' ).attr( 'tabindex', '0' );
|
||||
// Add 'selected' class to model, set aria-checked to true.
|
||||
this.$el.addClass( 'selected' ).attr( 'aria-checked', true );
|
||||
// Make the checkbox tabable, except in media grid (bulk select mode).
|
||||
if ( ! ( controller.isModeActive( 'grid' ) && controller.isModeActive( 'select' ) ) ) {
|
||||
this.$( '.check' ).attr( 'tabindex', '0' );
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @param {Backbone.Model} model
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue