There is a small trick - if you want an item which not have focus anabled by default you should make it tabbable by seting its tabindex="N"
- N
is a number. As simple as that. if you add tabindex to your clickable items they will get focus when you click. If a tag can be tabbed it have to be able to get focus. Adding tabindex
attribute to all nodes of the menu is very simple if you have jQuery
loaded:
$(function() {
$('#navbar *').attr('tabindex', '1');
});
end everithing comes in place. You can do it using pure JavaScript of course.