mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 01:48:21 +01:00
Twenty Fourteen: match screen-reader-text
accessibility styles a bit better with core, to avoid a jump when you move through the links, and to avoid a horizontal scroll at certain viewport widths. Also fix JS focus by specifying the first match object. Closes #25592.
Built from https://develop.svn.wordpress.org/trunk@26843 git-svn-id: http://core.svn.wordpress.org/trunk@26730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
21b5149477
commit
adb22a86fd
@ -262,7 +262,7 @@ function twentyfourteen_scripts() {
|
||||
) );
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131205', true );
|
||||
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131209', true );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
that.toggleClass( 'active' );
|
||||
wrapper.toggleClass( 'hide' );
|
||||
|
||||
if ( that.is( '.active' ) || $( '.screen-reader-text' ) === event.target ) {
|
||||
if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) {
|
||||
wrapper.find( '.search-field' ).focus();
|
||||
}
|
||||
} );
|
||||
|
@ -98,8 +98,8 @@ td {
|
||||
}
|
||||
|
||||
.search-toggle .screen-reader-text {
|
||||
right: auto;
|
||||
left: 0;
|
||||
right: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */
|
||||
left: auto;
|
||||
}
|
||||
|
||||
|
||||
|
@ -878,6 +878,10 @@ span + .edit-link:before,
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.search-toggle .screen-reader-text {
|
||||
left: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */
|
||||
}
|
||||
|
||||
.search-box-wrapper {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
|
Loading…
Reference in New Issue
Block a user