Skip to content
Permalink
Browse files

Menu: Add ui-state-active to parent item when submenu item receives f…

…ocus.
  • Loading branch information
jzaefferer committed Apr 23, 2011
1 parent 4955699 commit 6326da3fdb29ea4f40e39bc06abf14cde5ba5c8c
Showing with 3 additions and 2 deletions.
  1. +3 −2 ui/jquery.ui.menu.js
@@ -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() {

0 comments on commit 6326da3

Please sign in to comment.
You can’t perform that action at this time.