mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Button Tests: move aria-pressed test to correct module
This commit is contained in:
parent
caacf8f504
commit
22bd9fc704
@ -88,4 +88,15 @@ test("buttonset (rtl)", function() {
|
||||
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
|
||||
});
|
||||
|
||||
test( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
|
||||
expect( 3 );
|
||||
|
||||
$("#check2").button().change( function() {
|
||||
var lbl = $( this ).button("widget");
|
||||
ok( this.checked, "checked ok" );
|
||||
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
|
||||
ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
|
||||
}).button("widget").simulate("click");
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
@ -23,15 +23,4 @@ test( "when button loses focus, ensure active state is removed (#8559)", functio
|
||||
}).focus().simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } ).simulate( "keypress", { keyCode: $.ui.keyCode.ENTER } );
|
||||
});
|
||||
|
||||
test( "ensure checked and aria after single click on checkbox label button", function() {
|
||||
expect( 3 );
|
||||
|
||||
$("#check2").button().change( function() {
|
||||
var lbl = $( this ).button("widget");
|
||||
ok( this.checked, "checked ok" );
|
||||
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
|
||||
ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
|
||||
}).button("widget").simulate("click");
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user