Browse files

Selectmenu: follow-up for menu, reset aria-activedescendant to select…

…ed item when menu is closed
  • Loading branch information...
1 parent a59b3c7 commit 228a9b91fb1a90490a7a1f71dee89a920efa1b5e @fnagel fnagel committed Oct 26, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 ui/jquery.ui.selectmenu.js
View
4 ui/jquery.ui.selectmenu.js
@@ -230,9 +230,11 @@ $.widget( "ui.selectmenu", {
close: function( event ) {
if ( this.isOpen ) {
+ var id = this._getSelectedItem().find( "a" ).attr( "id" );
this.isOpen = false;
this._toggleAttr();
- this.button.attr( "aria-activedescendant", this._getSelectedItem().find( "a" ).attr( "id" ) );
+ this.button.attr( "aria-activedescendant", id );
+ this.menu.attr( "aria-activedescendant", id );
this._trigger( "close", event );
}
},

0 comments on commit 228a9b9

Please sign in to comment.