2009-02-02 14:36:08 +00:00
|
|
|
/*
|
|
|
|
* progressbar_core.js
|
|
|
|
*/
|
2009-02-04 04:39:31 +00:00
|
|
|
|
|
|
|
var el;
|
|
|
|
|
2009-02-02 14:36:08 +00:00
|
|
|
(function($) {
|
|
|
|
|
|
|
|
module("progressbar: core");
|
|
|
|
|
2009-02-04 04:39:31 +00:00
|
|
|
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");
|
2011-07-12 15:36:34 +00:00
|
|
|
equals(el.attr("aria-disabled"), "true", "aria-disabled on");
|
2009-02-04 04:39:31 +00:00
|
|
|
el.progressbar("enable");
|
2010-04-13 11:25:09 +00:00
|
|
|
// FAIL: for some reason IE6 and 7 return a boolean false instead of the string
|
2011-07-12 15:36:34 +00:00
|
|
|
equals(el.attr("aria-disabled"), "false", "aria-disabled off");
|
2009-02-02 14:36:08 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
})(jQuery);
|