Make WordPress Core


Ignore:
Timestamp:
07/25/2012 04:18:14 PM (12 years ago)
Author:
ryan
Message:

More screen reader text for list table checkboxes and theme install search. Props MikeLittle, SergeyBiryukov. see #21325

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/theme-install.php

    r21318 r21323  
    5959    <input type="hidden" name="tab" value="search" />
    6060    <?php if ( $type_selector ) : ?>
    61     <label class="screen-reader-text" for="typeselector"><?php _e("Type of search"); ?></label>
     61    <label class="screen-reader-text" for="typeselector"><?php _e('Type of search'); ?></label>
    6262    <select name="type" id="typeselector">
    6363    <option value="term" <?php selected('term', $type) ?>><?php _e('Keyword'); ?></option>
     
    6565    <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option>
    6666    </select>
    67     <label class="screen-reader-text" for="s"><?php printf( __("Search by %s"), ( $type == 'term' ? __( 'keyword' ) : $type ) ); ?></label>
     67    <label class="screen-reader-text" for="s"><?php
     68    switch ( $type ) {
     69        case 'term':
     70            _e( 'Search by keyword' );
     71            break;
     72        case 'author':
     73            _e( 'Search by author' );
     74            break;
     75        case 'tag':
     76            _e( 'Search by tag' );
     77            break;
     78    }
     79    ?></label>
    6880    <?php else : ?>
    69     <label class="screen-reader-text" for="s"><?php _e("Search by keyword"); ?></label>
     81    <label class="screen-reader-text" for="s"><?php _e('Search by keyword'); ?></label>
    7082    <?php endif; ?>
    7183    <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
Note: See TracChangeset for help on using the changeset viewer.