File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -213,12 +213,13 @@ $.widget("ui.menu", {
213213 . end ( ) ;
214214 // need to remove the attribute before adding it for the screenreader to pick up the change
215215 // see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f
216- this . element . removeAttr ( "aria-activedescendant" ) . attr ( "aria-activedescendant" , self . itemId ) ;
217-
216+ this . element . removeAttr ( "aria-activedescendant" ) . attr ( "aria-activedescendant" , self . itemId )
217+
218218 self . _close ( ) ;
219219 var nested = $ ( ">ul" , item ) ;
220220 if ( nested . length && / ^ m o u s e / . test ( event . type ) ) {
221221 self . _open ( nested ) ;
222+ this . active . find ( ">a:first" ) . addClass ( "ui-state-active" ) ;
222223 }
223224 this . activeMenu = item . parent ( ) ;
224225
@@ -229,7 +230,7 @@ $.widget("ui.menu", {
229230 if ( ! this . active ) {
230231 return ;
231232 }
232-
233+
233234 this . active . children ( "a" ) . removeClass ( "ui-state-focus" ) ;
234235 // remove only generated id
235236 $ ( "#" + this . menuId + "-activedescendant" ) . removeAttr ( "id" ) ;
@@ -261,7 +262,9 @@ $.widget("ui.menu", {
261262 } ,
262263
263264 _close : function ( ) {
264- this . active . parent ( ) . find ( "ul" ) . hide ( ) ;
265+ this . active . parent ( )
266+ . find ( "ul" ) . hide ( ) . end ( )
267+ . find ( "a.ui-state-active" ) . removeClass ( "ui-state-active" ) ;
265268 } ,
266269
267270 left : function ( event ) {
You can’t perform that action at this time.
0 commit comments