_s: Update search form markup to make it forward compatible with HTML5

search form in 3.6. As a result, `searchfornm.php` can be safely
removed in the future. Also fixes #240.
This commit is contained in:
obenland 2013-06-29 16:19:10 -04:00
parent a514017986
commit 6e22132768
2 changed files with 8 additions and 6 deletions

View File

@ -5,8 +5,10 @@
* @package _s * @package _s
*/ */
?> ?>
<form method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search"> <form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label for="s" class="screen-reader-text"><?php _ex( 'Search', 'assistive text', '_s' ); ?></label> <label>
<input type="search" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', '_s' ); ?>" /> <span class="screen-reader-text"><?php _ex( 'Search for:', 'label', '_s' ); ?></span>
<input type="submit" class="submit" id="searchsubmit" value="<?php echo esc_attr_x( 'Search', 'submit button', '_s' ); ?>" /> <input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', '_s' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php _ex( 'Search for:', 'label', '_s' ); ?>" />
</form> </label>
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', '_s' ); ?>'" />
</form>

View File

@ -579,7 +579,7 @@ object {
} }
/* Search widget */ /* Search widget */
.widget_search .submit { .widget_search .search-submit {
display: none; display: none;
} }