diff options
author | Felix Nagel <info@felixnagel.com> | 2012-10-26 00:41:17 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-10-26 00:41:17 +0200 |
commit | 228a9b91fb1a90490a7a1f71dee89a920efa1b5e (patch) | |
tree | adcdd1d82568850fd4ede0f1bec17024c80d47e2 /ui/jquery.ui.selectmenu.js | |
parent | a59b3c75851429c22bd87c0992b43da5e386230e (diff) | |
download | jquery-ui-228a9b91fb1a90490a7a1f71dee89a920efa1b5e.tar.gz jquery-ui-228a9b91fb1a90490a7a1f71dee89a920efa1b5e.zip |
Selectmenu: follow-up for menu, reset aria-activedescendant to selected item when menu is closed
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 54e478a1b..6b353d8db 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/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 ); } }, |