Make the Twenty Fifteen search form submit button screen reader accessible rather than hidden to all users. Fixes #30110. Props mattweibe, rianrietveld.

git-svn-id: https://develop.svn.wordpress.org/trunk@30053 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2014-10-28 18:13:19 +00:00
parent 6df24465f4
commit 105b60bd0b
2 changed files with 14 additions and 4 deletions

View File

@ -310,6 +310,20 @@ function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) {
}
add_filter( 'walker_nav_menu_start_el', 'twentyfifteen_nav_description', 10, 4 );
/**
* Add a `screen-reader-text` class to the search form's submit button
*
* @since Twenty Fifteen 1.0
*
* @param string $html Search form HTML
*
* @return string Modified search form HTML
*/
function twentyfifteen_search_form_modify( $html ) {
return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html );
}
add_filter( 'get_search_form', 'twentyfifteen_search_form_modify' );
/**
* Implement the Custom Header feature.
*

View File

@ -596,10 +596,6 @@ textarea {
bottom: 0;
}
.search-form input[type="submit"] {
display: none;
}
/**
* 6.0 Navigations