Selectmenu: follow-up for menu, reset aria-activedescendant to selected item when menu is closed

This commit is contained in:
Felix Nagel 2012-10-26 00:41:17 +02:00
parent a59b3c7585
commit 228a9b91fb

View File

@ -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 );
}
},