Support for "tabbing" through the admin bar and admin menu, fixes #19088

git-svn-id: https://develop.svn.wordpress.org/trunk@19162 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-11-05 01:13:18 +00:00
parent 78e94523c8
commit bf02e004e0
11 changed files with 42 additions and 18 deletions

View File

@@ -22,6 +22,19 @@ if ( typeof(jQuery) != 'undefined' ) {
$(this).parents('#wp-admin-bar-get-shortlink').removeClass('selected');
}).focus().select();
});
$('.ab-top-menu > li > a').bind('focus.adminbar', function(){
$(this).parent().addClass('hover').find('a').attr('tabindex', '-1').attr('tabindex', '1');
});
$('.ab-top-menu li ul li a').bind('blur.adminbar', function(){
var t = $(this);
setTimeout(function(){
if ( !t.parent().parent().find('a:focus').length )
t.parents('li.menupop').removeClass('hover');
}, 200);
});
});
} else {
(function(d, w) {