diff options
author | Felix Nagel <info@felixnagel.com> | 2012-01-11 21:20:24 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-01-11 21:20:24 +0100 |
commit | 762131396e8c993b1bef3d786bbd6cc34dfb4bce (patch) | |
tree | 9cdfc179f4f18e42f4277ca6071b5dd950a3931a /tests | |
parent | 8c17f74a1e64e134108f790d2527df18284ac9cc (diff) | |
download | jquery-ui-762131396e8c993b1bef3d786bbd6cc34dfb4bce.tar.gz jquery-ui-762131396e8c993b1bef3d786bbd6cc34dfb4bce.zip |
Selectmenu: improved disabled state handling
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/selectmenu/selectmenu_methods.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit/selectmenu/selectmenu_methods.js b/tests/unit/selectmenu/selectmenu_methods.js index 263d27be2..5935f3ea0 100644 --- a/tests/unit/selectmenu/selectmenu_methods.js +++ b/tests/unit/selectmenu/selectmenu_methods.js @@ -33,21 +33,22 @@ test("enable / disable", function () { var element = $("#speed").selectmenu(); var widget = element.selectmenu("widget"); var button = widget.filter(".ui-selectmenu-button"); + var link = button.children("a"); var menu = widget.filter(".ui-selectmenu-menu"); element.selectmenu("disable") ok( element.selectmenu("option", "disabled"), "disable: widget option" ); equals( button.attr("aria-disabled"), "true", "disable: button wrapper ARIA" ); - equals( button.children("a").attr("aria-disabled"), "true", "disable: button ARIA" ); - equals( button.children("a").attr("tabindex"), -1, "disable: button tabindex" ); + equals( link.attr("aria-disabled"), "true", "disable: button ARIA" ); + equals( link.attr("tabindex"), -1, "disable: button tabindex" ); equals( menu.attr("aria-disabled"), "true", "disable: menu wrapper ARIA" ); equals( menu.children("ul").attr("aria-disabled"), "true", "disable: menu ARIA" ); element.selectmenu("enable") ok( !element.selectmenu("option", "disabled"), "enable: widget option" ); equals( button.attr("aria-disabled"), "false", "enable: button wrapper ARIA" ); - equals( button.children("a").attr("aria-disabled"), "false", "enable: button ARIA" ); - equals( button.children("a").attr("tabindex"), 0, "enable: button tabindex" ); + equals( link.attr("aria-disabled"), "false", "enable: button ARIA" ); + equals( link.attr("tabindex"), 0, "enable: button tabindex" ); equals( menu.attr("aria-disabled"), "false", "enable: menu wrapper ARIA" ); equals( menu.children("ul").attr("aria-disabled"), "false", "enable: menu ARIA" ); }); |