From b2d50f9ffc7d317da1ccc01a809e10624ff1933e Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 25 Oct 2012 22:24:37 +0200 Subject: Selectmenu: fixed aria-activedescendant for button element --- ui/jquery.ui.selectmenu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 8888fac4d..135024fbc 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -156,7 +156,7 @@ $.widget( "ui.selectmenu", { that.focus = item.index; // Set ARIA active decendent - that.button.attr( "aria-activedescendant", item.element.attr( "id" ) ); + that.button.attr( "aria-activedescendant", that.menuItems.eq( item.index ).find( "a" ).attr( "id" ) ); }, // set ARIA role @@ -383,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.attr( "id" ) ); + this.button.attr( "aria-activedescendant", this.menuItems.eq( item.index ).find( "a" ).attr( "id" ) ); }, _setOption: function( key, value ) { -- cgit v1.2.3