mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-05-13 03:01:39 -04:00
Selectmenu: follow-up for menu, reset aria-activedescendant to selected item when menu is closed
This commit is contained in:
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 );
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user