Make WordPress Core

Changeset 29435


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

Media Grid: add screen reader text in a subview on the toolbar, a media.view.Label instance before media.view.DateFilter.

See #29026.

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

Legend:

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

    r29434 r29435  
    57175717                    template: media.template( 'media-library-view-switcher')
    57185718                });
     5719
    57195720                this.toolbar.set( 'libraryViewSwitcher', new LibraryViewSwitcher({
    57205721                    controller: this.controller,
     
    57225723                }).render() );
    57235724
     5725                // BulkSelection is a <div> with subviews, including screen reader text
    57245726                this.toolbar.set( 'bulkSelection', new media.view.BulkSelection({
    57255727                    controller: this.controller,
    57265728                    priority: -70
     5729                }).render() );
     5730
     5731                // DateFilter is a <select>, screen reader text needs to be rendered before
     5732                this.toolbar.set( 'dateFilterLabel', new media.view.Label({
     5733                    value: l10n.filterByDate,
     5734                    attributes: {
     5735                        'for': 'media-attachment-date-filters'
     5736                    },
     5737                    priority: -75
    57275738                }).render() );
    57285739                this.toolbar.set( 'dateFilter', new media.view.DateFilter({
     
    65846595        render: function() {
    65856596            this.$el.html( this.value );
     6597
     6598            return this;
    65866599        }
    65876600    });
  • trunk/src/wp-includes/media.php

    r29434 r29435  
    29412941        'deletePermanently'      => __( 'Delete Permanently' ),
    29422942        'apply'                  => __( 'Apply' ),
     2943        'filterByDate'           => __( 'Filter by date' ),
    29432944
    29442945        // Library Details
Note: See TracChangeset for help on using the changeset viewer.