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", {
213
213
. end ( ) ;
214
214
// need to remove the attribute before adding it for the screenreader to pick up the change
215
215
// 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
+
218
218
self . _close ( ) ;
219
219
var nested = $ ( ">ul" , item ) ;
220
220
if ( nested . length && / ^ m o u s e / . test ( event . type ) ) {
221
221
self . _open ( nested ) ;
222
+ this . active . find ( ">a:first" ) . addClass ( "ui-state-active" ) ;
222
223
}
223
224
this . activeMenu = item . parent ( ) ;
224
225
@@ -229,7 +230,7 @@ $.widget("ui.menu", {
229
230
if ( ! this . active ) {
230
231
return ;
231
232
}
232
-
233
+
233
234
this . active . children ( "a" ) . removeClass ( "ui-state-focus" ) ;
234
235
// remove only generated id
235
236
$ ( "#" + this . menuId + "-activedescendant" ) . removeAttr ( "id" ) ;
@@ -261,7 +262,9 @@ $.widget("ui.menu", {
261
262
} ,
262
263
263
264
_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" ) ;
265
268
} ,
266
269
267
270
left : function ( event ) {
You can’t perform that action at this time.
0 commit comments