2012-05-26 03:10:46 +00:00
|
|
|
module( "progressbar: core" );
|
2009-02-04 04:39:31 +00:00
|
|
|
|
2012-05-26 03:10:46 +00:00
|
|
|
test( "accessibility", function() {
|
|
|
|
expect( 7 );
|
|
|
|
var element = $( "#progressbar" ).progressbar();
|
2009-02-04 04:39:31 +00:00
|
|
|
|
2012-05-26 03:10:46 +00:00
|
|
|
equal( element.attr( "role" ), "progressbar", "aria role" );
|
|
|
|
equal( element.attr( "aria-valuemin" ), 0, "aria-valuemin" );
|
|
|
|
equal( element.attr( "aria-valuemax" ), 100, "aria-valuemax" );
|
|
|
|
equal( element.attr( "aria-valuenow" ), 0, "aria-valuenow initially" );
|
2009-02-02 14:36:08 +00:00
|
|
|
|
2012-05-26 03:10:46 +00:00
|
|
|
element.progressbar( "value", 77 );
|
|
|
|
equal( element.attr( "aria-valuenow" ), 77, "aria-valuenow" );
|
2009-02-02 14:36:08 +00:00
|
|
|
|
2012-05-26 03:10:46 +00:00
|
|
|
element.progressbar( "disable" );
|
|
|
|
equal( element.attr( "aria-disabled" ), "true", "aria-disabled on" );
|
2009-02-04 04:39:31 +00:00
|
|
|
|
2012-05-26 03:10:46 +00:00
|
|
|
element.progressbar( "enable" );
|
|
|
|
equal( element.attr( "aria-disabled" ), "false", "aria-disabled off" );
|
2009-02-02 14:36:08 +00:00
|
|
|
});
|