@@ -73,10 +73,9 @@ $.widget( "ui.selectmenu", {
73
73
74
74
_drawButton : function ( ) {
75
75
var tabindex = this . element . attr ( 'tabindex' ) ;
76
- var labelSelector = "label[for='" + this . element . attr ( "id" ) + "']" ;
77
76
78
77
// Find existing label
79
- this . labelElement = $ ( labelSelector ) . uniqueId ( ) ;
78
+ this . labelElement = $ ( "label[for='" + this . element . attr ( "id" ) + "']" ) . uniqueId ( ) ;
80
79
81
80
// hide original select tag
82
81
this . element . hide ( ) ;
@@ -89,7 +88,7 @@ $.widget( "ui.selectmenu", {
89
88
id : this . ids . button ,
90
89
width : this . element . outerWidth ( ) ,
91
90
role : 'combobox' ,
92
- 'aria-labelledby' : this . labelElement . attr ( "id" ) ,
91
+ 'aria-labelledby' : this . labelElement . attr ( "id" ) ,
93
92
'aria-expanded' : false ,
94
93
'aria-autocomplete' : 'list' ,
95
94
'aria-owns' : this . ids . menu ,
@@ -157,7 +156,7 @@ $.widget( "ui.selectmenu", {
157
156
that . focus = item . index ;
158
157
159
158
// Set ARIA active decendent
160
- that . button . attr ( "aria-activedescendant" , item . element . uniqueId ( ) . attr ( "id" ) ) ;
159
+ that . button . attr ( "aria-activedescendant" , item . element . attr ( "id" ) ) ;
161
160
162
161
} ,
163
162
// set ARIA role
@@ -384,7 +383,7 @@ $.widget( "ui.selectmenu", {
384
383
// change ARIA attr
385
384
this . menuItems . find ( "a" ) . attr ( "aria-selected" , false ) ;
386
385
this . _getSelectedItem ( ) . find ( "a" ) . attr ( "aria-selected" , true ) ;
387
- this . button . attr ( "aria-activedescendant" , item . element . uniqueId ( ) . attr ( "id" ) ) ;
386
+ this . button . attr ( "aria-activedescendant" , item . element . attr ( "id" ) ) ;
388
387
} ,
389
388
390
389
_setOption : function ( key , value ) {
0 commit comments