WordPress.org

Make WordPress Core

Ticket #17524: 18135-searchform-label.diff

File 18135-searchform-label.diff, 705 bytes (added by iandstewart, 4 years ago)

CSS-hidden label for search form

  • wp-content/themes/twentyeleven/searchform.php

     
    88 */ 
    99?> 
    1010        <form method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> 
     11                <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label> 
    1112                <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> 
    1213                <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> 
    1314        </form>