aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Bolter <david.bolter@gmail.com>2008-10-29 16:57:04 +0000
committerDavid Bolter <david.bolter@gmail.com>2008-10-29 16:57:04 +0000
commitb0772dc3d81f00da5d4ce478e36dd5e94649f0d4 (patch)
tree09bdee48225ed6ecd8675b7571b5c376f1d97651 /tests
parent95980d34da7f4ef6637a107df5fd669c624fd9c6 (diff)
downloadjquery-ui-b0772dc3d81f00da5d4ce478e36dd5e94649f0d4.tar.gz
jquery-ui-b0772dc3d81f00da5d4ce478e36dd5e94649f0d4.zip
added ARIA semantics, and tests.
patch review:scott.gonzalez@gmail.com (fixes bug #3482)
Diffstat (limited to 'tests')
-rw-r--r--tests/progressbar.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/progressbar.js b/tests/progressbar.js
index e95f17a80..f3e5c625e 100644
--- a/tests/progressbar.js
+++ b/tests/progressbar.js
@@ -52,5 +52,20 @@ test("set defaults on init", function() {
});
+test("accessibility", function() {
+ expect(7);
+ el = $("#progressbar").progressbar();
+
+ equals(el.ariaRole(), "progressbar", "aria role");
+ equals(el.ariaState("valuemin"), 0, "aria-valuemin");
+ equals(el.ariaState("valuemax"), 100, "aria-valuemax");
+ equals(el.ariaState("valuenow"), 0, "aria-valuenow initially");
+ el.progressbar("progress", 77);
+ equals(el.ariaState("valuenow"), 77, "aria-valuenow");
+ el.progressbar("disable");
+ equals(el.ariaState("disabled"), "true", "aria-disabled");
+ el.progressbar("enable");
+ equals(el.ariaState("disabled"), "false", "enabled");
+});
})(jQuery);