Media Grid: Don't make checkboxes tabbable when in bulk select media grid mode, fixes tabbing in bulk select mode.
Props adamsilverstein. See #28822. git-svn-id: https://develop.svn.wordpress.org/trunk@29585 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
506bf18b7e
commit
0ccd68f239
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue