Skip to content

Commit 228a9b9

Browse files
committed
Selectmenu: follow-up for menu, reset aria-activedescendant to selected item when menu is closed
1 parent a59b3c7 commit 228a9b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/jquery.ui.selectmenu.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,11 @@ $.widget( "ui.selectmenu", {
230230

231231
close: function( event ) {
232232
if ( this.isOpen ) {
233+
var id = this._getSelectedItem().find( "a" ).attr( "id" );
233234
this.isOpen = false;
234235
this._toggleAttr();
235-
this.button.attr( "aria-activedescendant", this._getSelectedItem().find( "a" ).attr( "id" ) );
236+
this.button.attr( "aria-activedescendant", id );
237+
this.menu.attr( "aria-activedescendant", id );
236238
this._trigger( "close", event );
237239
}
238240
},

0 commit comments

Comments
 (0)