Make WordPress Core

Changeset 29585


Ignore:
Timestamp:
08/24/2014 04:54:35 PM (12 years ago)
Author:
wonderboymusic
Message:

Media Grid: Don't make checkboxes tabbable when in bulk select media grid mode, fixes tabbing in bulk select mode.

Props adamsilverstein.
See #28822.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r29584 r29585  
    49434943         */
    49444944        select: function( model, collection ) {
    4945             var selection = this.options.selection;
     4945            var selection = this.options.selection,
     4946                controller = this.controller;
    49464947
    49474948            // Check if a selection exists and if it's the collection provided.
     
    49574958            }
    49584959
    4959             // Add 'selected' class to model, set aria-checked to true and make the checkbox tabable.
    4960             this.$el.addClass( 'selected' ).attr( 'aria-checked', true )
    4961                 .find( '.check' ).attr( 'tabindex', '0' );
     4960            // Add 'selected' class to model, set aria-checked to true.
     4961            this.$el.addClass( 'selected' ).attr( 'aria-checked', true );
     4962            //  Make the checkbox tabable, except in media grid (bulk select mode).
     4963            if ( ! ( controller.isModeActive( 'grid' ) && controller.isModeActive( 'select' ) ) ) {
     4964                this.$( '.check' ).attr( 'tabindex', '0' );
     4965            }
    49624966        },
    49634967        /**
Note: See TracChangeset for help on using the changeset viewer.