mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Accessibility shortcuts: new looks and fix for the WebKit focus bug, props lessbloat, fixes #21471
git-svn-id: https://develop.svn.wordpress.org/trunk@22249 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -67,6 +67,19 @@ if ( typeof(jQuery) != 'undefined' ) {
|
||||
$('html, body').animate({ scrollTop: 0 }, 'fast');
|
||||
});
|
||||
|
||||
// fix focus bug in WebKit
|
||||
$('.screen-reader-shortcut').keydown( function(e) {
|
||||
if ( 13 != e.which )
|
||||
return;
|
||||
|
||||
var id = $(this).attr('href');
|
||||
|
||||
if ( $.browser.webkit && id && id.charAt(0) == '#' ) {
|
||||
setTimeout(function () {
|
||||
$(id).focus();
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
(function(d, w) {
|
||||
|
||||
Reference in New Issue
Block a user