mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Selectmenu: follow-up for menu, reset aria-activedescendant to selected item when menu is closed
This commit is contained in:
parent
a59b3c7585
commit
228a9b91fb
4
ui/jquery.ui.selectmenu.js
vendored
4
ui/jquery.ui.selectmenu.js
vendored
@ -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 );
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user