mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
29 lines
766 B
JavaScript
29 lines
766 B
JavaScript
/*
|
|
* progressbar_core.js
|
|
*/
|
|
|
|
var el;
|
|
|
|
(function($) {
|
|
|
|
module("progressbar: core");
|
|
|
|
test("accessibility", function() {
|
|
expect(7);
|
|
el = $("#progressbar").progressbar();
|
|
|
|
equals(el.attr("role"), "progressbar", "aria role");
|
|
equals(el.attr("aria-valuemin"), 0, "aria-valuemin");
|
|
equals(el.attr("aria-valuemax"), 100, "aria-valuemax");
|
|
equals(el.attr("aria-valuenow"), 0, "aria-valuenow initially");
|
|
el.progressbar("value", 77);
|
|
equals(el.attr("aria-valuenow"), 77, "aria-valuenow");
|
|
el.progressbar("disable");
|
|
equals(el.attr("aria-disabled"), "true", "aria-disabled on");
|
|
el.progressbar("enable");
|
|
// FAIL: for some reason IE6 returns a boolean false instead of the string
|
|
equals(el.attr("aria-disabled"), "false", "aria-disabled off");
|
|
});
|
|
|
|
})(jQuery);
|