Make WordPress Core

Changeset 29437


Ignore:
Timestamp:
08/07/2014 08:53:03 PM (10 years ago)
Author:
wonderboymusic
Message:

Media Grid: use a media.view.Label instance in the toolbar for the screen reader text for Search.

See #29026.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r29436 r29437  
    57675767
    57685768            if ( this.options.search ) {
     5769                // Search is an input, screen reader text needs to be rendered before
     5770                this.toolbar.set( 'searchLabel', new media.view.Label({
     5771                    value: l10n.searchMediaLabel,
     5772                    attributes: {
     5773                        'for': 'media-search-input'
     5774                    },
     5775                    priority:   60
     5776                }).render() );
    57695777                this.toolbar.set( 'search', new media.view.Search({
    57705778                    controller: this.controller,
     
    57725780                    priority:   60
    57735781                }).render() );
    5774                 screenReaderText = $( '<label class="screen-reader-text" for="media-search-input">' + l10n.search + '</label>' );
    5775                 this.toolbar.get( 'search' ).$el.before( screenReaderText );
    57765782            }
    57775783
  • trunk/src/wp-includes/media.php

    r29435 r29437  
    29422942        'apply'                  => __( 'Apply' ),
    29432943        'filterByDate'           => __( 'Filter by date' ),
     2944        'searchMediaLabel'       => __( 'Search Media' ),
    29442945
    29452946        // Library Details
Note: See TracChangeset for help on using the changeset viewer.