Make WordPress Core

Changeset 28839


Ignore:
Timestamp:
06/26/2014 01:27:37 AM (10 years ago)
Author:
wonderboymusic
Message:

Dynamically prepend screen reader text to the attachment filters dropdown and the search box in the media modal.

Props SergeyBiryukov.
Fixes #25102.

File:
1 edited

Legend:

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

    r28838 r28839  
    53745374        tagName:   'input',
    53755375        className: 'search',
     5376        id:        'media-search-input',
    53765377
    53775378        attributes: {
     
    54155416        tagName:   'select',
    54165417        className: 'attachment-filters',
     5418        id:        'media-attachment-filters',
    54175419
    54185420        events: {
     
    56405642
    56415643        createToolbar: function() {
    5642             var filters, FiltersConstructor;
     5644            var filters, FiltersConstructor, screenReaderText;
    56435645
    56445646            /**
     
    56665668                    priority:   -80
    56675669                }).render() );
     5670
     5671                screenReaderText = $( '<label class="screen-reader-text" for="media-attachment-filters">' + l10n.select + '</label>' );
     5672                this.toolbar.get( 'filters' ).$el.before( screenReaderText );
    56685673            }
    56695674
     
    56785683                    priority:   60
    56795684                }).render() );
     5685                screenReaderText = $( '<label class="screen-reader-text" for="media-search-input">' + l10n.search + '</label>' );
     5686                this.toolbar.get( 'search' ).$el.before( screenReaderText );
    56805687            }
    56815688
Note: See TracChangeset for help on using the changeset viewer.