Make the Twenty Fifteen search form submit button screen reader accessible rather than hidden to all users. Fixes #30110. Props mattweibe, rianrietveld.
Built from https://develop.svn.wordpress.org/trunk@30053 git-svn-id: http://core.svn.wordpress.org/trunk@30053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bd48b40cc4
commit
bc9446bd69
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -596,10 +596,6 @@ textarea {
|
|||
bottom: 0;
|
||||
}
|
||||
|
||||
.search-form input[type="submit"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 6.0 Navigations
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-alpha-30052';
|
||||
$wp_version = '4.1-alpha-30053';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue