mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Menu: Add ui-state-active to parent item when submenu item receives focus.
This commit is contained in:
parent
49556995d2
commit
6326da3fdb
5
ui/jquery.ui.menu.js
vendored
5
ui/jquery.ui.menu.js
vendored
@ -229,6 +229,9 @@ $.widget("ui.menu", {
|
||||
// need to remove the attribute before adding it for the screenreader to pick up the change
|
||||
// see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f
|
||||
this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant", self.itemId)
|
||||
|
||||
// highlight active parent menu item, if any
|
||||
this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");
|
||||
|
||||
self.timer = setTimeout(function() {
|
||||
self._close();
|
||||
@ -277,8 +280,6 @@ $.widget("ui.menu", {
|
||||
);
|
||||
|
||||
submenu.show().position(position);
|
||||
|
||||
this.active.find(">a:first").addClass("ui-state-active");
|
||||
},
|
||||
|
||||
closeAll: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user