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:
Andrew Ozz
2012-10-16 21:26:59 +00:00
parent 1d02d4bf27
commit 7c30ff0dcb
6 changed files with 55 additions and 19 deletions
+13
View File
@@ -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) {