diff options
author | Felix Nagel <info@felixnagel.com> | 2012-10-25 22:24:50 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-10-25 22:24:50 +0200 |
commit | e7e73cec07d891fe260c616c833c28d3d4a0402f (patch) | |
tree | b9eff8d72ede5e52c96e970fd5b92c4c7e3afc56 /tests/unit/selectmenu/selectmenu_core.js | |
parent | b2d50f9ffc7d317da1ccc01a809e10624ff1933e (diff) | |
download | jquery-ui-e7e73cec07d891fe260c616c833c28d3d4a0402f.tar.gz jquery-ui-e7e73cec07d891fe260c616c833c28d3d4a0402f.zip |
Selectmenu tests: aria-activedescendant für button
Diffstat (limited to 'tests/unit/selectmenu/selectmenu_core.js')
-rw-r--r-- | tests/unit/selectmenu/selectmenu_core.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/selectmenu/selectmenu_core.js b/tests/unit/selectmenu/selectmenu_core.js index 2bd7c47ee..d7c296133 100644 --- a/tests/unit/selectmenu/selectmenu_core.js +++ b/tests/unit/selectmenu/selectmenu_core.js @@ -46,7 +46,7 @@ $.each([ } ], function( i, settings ) { test("state synchronization - after keydown - " + settings.type, function () { - expect(4); + expect(5); var links, element = $(settings.selector).selectmenu(), @@ -60,12 +60,13 @@ $.each([ button.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } ); equal( menu.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "menu aria-activedescendant" ); equal( links.eq(element[0].selectedIndex).attr("aria-selected"), "true", "selected menu link aria-selected" ); + equal( button.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "button aria-activedescendant" ); equal( element.find("option:selected").val(), selected.next("option").val() , "original select state" ); equal( button.text(), selected.next("option").text(), "button text" ); }); test("state synchronization - after click - " + settings.type, function () { - expect(4); + expect(5); var links, element = $(settings.selector).selectmenu(), @@ -80,6 +81,7 @@ $.each([ menu.find("a").last().simulate( "mouseover" ).trigger( "click" ); equal( menu.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "menu aria-activedescendant" ); equal( links.eq(element[0].selectedIndex).attr("aria-selected"), "true", "selected menu link aria-selected" ); + equal( button.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "button aria-activedescendant" ); equal( element.find("option:selected").val(), element.find("option").last().val(), "original select state" ); equal( button.text(), element.find("option").last().text(), "button text" ); }); |