WordPress.org

Make WordPress Core

Ticket #21325: theme-install.diff

File theme-install.diff, 1.3 KB (added by MikeLittle, 21 months ago)

Adds labels to theme search fields.

  • theme-install.php

     
    5858<form id="search-themes" method="get" action=""> 
    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> 
    6364        <option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></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> 
    7074<?php