mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: use item.index instead of _getSelectedItem method
This commit is contained in:
parent
40b8567526
commit
aa60a9e114
2
ui/jquery.ui.selectmenu.js
vendored
2
ui/jquery.ui.selectmenu.js
vendored
@ -389,7 +389,7 @@ $.widget( "ui.selectmenu", {
|
|||||||
this.buttonText.html( item.label );
|
this.buttonText.html( item.label );
|
||||||
// change ARIA attr
|
// change ARIA attr
|
||||||
this.menuItems.find( "a" ).attr( "aria-selected", false );
|
this.menuItems.find( "a" ).attr( "aria-selected", false );
|
||||||
this._getSelectedItem().find( "a" ).attr( "aria-selected", true );
|
this.menuItems.eq( item.index ).find( "a" ).attr( "aria-selected", true );
|
||||||
this.button.attr( "aria-labelledby", this.menuItems.eq( item.index ).find( "a" ).attr( "id" ) );
|
this.button.attr( "aria-labelledby", this.menuItems.eq( item.index ).find( "a" ).attr( "id" ) );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user