diff options
author | Robert Beuligmann <robertbeuligmann@gmail.com> | 2012-10-16 10:57:49 -0500 |
---|---|---|
committer | Robert Beuligmann <robertbeuligmann@gmail.com> | 2012-10-16 10:57:49 -0500 |
commit | 8e1e9562481de41db97dbb4525c01f519d436e74 (patch) | |
tree | 73a01d624a382579761ca48d6537f1549a846405 /ui/jquery.ui.selectmenu.js | |
parent | 20d19dbbf1edb9d313d921370b5a934ef40d3a2c (diff) | |
download | jquery-ui-8e1e9562481de41db97dbb4525c01f519d436e74.tar.gz jquery-ui-8e1e9562481de41db97dbb4525c01f519d436e74.zip |
Selectmenu: corrections based on code review.
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 5ad6a2f48..6a94a9353 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -73,10 +73,9 @@ $.widget( "ui.selectmenu", { _drawButton: function() { var tabindex = this.element.attr( 'tabindex' ); - var labelSelector = "label[for='" + this.element.attr("id") + "']"; // Find existing label - this.labelElement = $( labelSelector ).uniqueId(); + this.labelElement = $( "label[for='" + this.element.attr("id") + "']" ).uniqueId(); // hide original select tag this.element.hide(); @@ -89,7 +88,7 @@ $.widget( "ui.selectmenu", { id: this.ids.button, width: this.element.outerWidth(), role: 'combobox', - 'aria-labelledby': this.labelElement.attr("id"), + 'aria-labelledby': this.labelElement.attr( "id" ), 'aria-expanded': false, 'aria-autocomplete': 'list', 'aria-owns': this.ids.menu, @@ -157,7 +156,7 @@ $.widget( "ui.selectmenu", { that.focus = item.index; // Set ARIA active decendent - that.button.attr( "aria-activedescendant", item.element.uniqueId().attr( "id" ) ); + that.button.attr( "aria-activedescendant", item.element.attr( "id" ) ); }, // set ARIA role @@ -384,7 +383,7 @@ $.widget( "ui.selectmenu", { // change ARIA attr this.menuItems.find( "a" ).attr( "aria-selected", false ); this._getSelectedItem().find( "a" ).attr( "aria-selected", true ); - this.button.attr( "aria-activedescendant", item.element.uniqueId().attr( "id" ) ); + this.button.attr( "aria-activedescendant", item.element.attr( "id" ) ); }, _setOption: function( key, value ) { |