WordPress.org

Make WordPress Core

Changeset 21318


Ignore:
Timestamp:
07/24/2012 06:31:03 PM (8 years ago)
Author:
ryan
Message:

Add screen reader text for search fields in theme-install.php. Props MikeLittle. see #21325

File:
1 edited

Legend:

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

    r21143 r21318  
    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>
    6162    <select name="type" id="typeselector">
    6263    <option value="term" <?php selected('term', $type) ?>><?php _e('Keyword'); ?></option>
     
    6465    <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option>
    6566    </select>
     67    <label class="screen-reader-text" for="s"><?php printf( __("Search by %s"), ( $type == 'term' ? __( 'keyword' ) : $type ) ); ?></label>
     68    <?php else : ?>
     69    <label class="screen-reader-text" for="s"><?php _e("Search by keyword"); ?></label>
    6670    <?php endif; ?>
    67     <input type="search" name="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
     71    <input type="search" name="s" id="s" size="30" value="<?php echo esc_attr($term) ?>" autofocus="autofocus" />
    6872    <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
    6973</form>
Note: See TracChangeset for help on using the changeset viewer.