aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-11-26 20:24:31 -0500
committerMike Sherov <mike.sherov@gmail.com>2012-11-26 20:24:31 -0500
commit22bd9fc7045f994c7e7ce4abd3eceff4cde88273 (patch)
tree638236d4e310ef6cff4e2c507fd41dac8d9bd14a
parentcaacf8f5041ad434b8e0dd1069936eb91e4c3394 (diff)
downloadjquery-ui-22bd9fc7045f994c7e7ce4abd3eceff4cde88273.tar.gz
jquery-ui-22bd9fc7045f994c7e7ce4abd3eceff4cde88273.zip
Button Tests: move aria-pressed test to correct module
-rw-r--r--tests/unit/button/button_core.js11
-rw-r--r--tests/unit/button/button_events.js11
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js
index f3c50d840..fb03bb8a0 100644
--- a/tests/unit/button/button_core.js
+++ b/tests/unit/button/button_core.js
@@ -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);
diff --git a/tests/unit/button/button_events.js b/tests/unit/button/button_events.js
index b808b59b7..7b79c41ea 100644
--- a/tests/unit/button/button_events.js
+++ b/tests/unit/button/button_events.js
@@ -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);