From 0080f2d5813747cbbe44021197e352564e02b782 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 12 Jul 2011 11:36:34 -0400 Subject: Use .attr() for boolean ARIA attributes. --- tests/unit/accordion/accordion_core.js | 16 ++++++++-------- tests/unit/progressbar/progressbar_core.js | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/unit/accordion/accordion_core.js b/tests/unit/accordion/accordion_core.js index 7bf71c31b..280339c26 100644 --- a/tests/unit/accordion/accordion_core.js +++ b/tests/unit/accordion/accordion_core.js @@ -39,15 +39,15 @@ test( "accessibility", function () { equals( element.attr( "role" ), "tablist", "main role" ); equals( headers.attr( "role" ), "tab", "tab roles" ); equals( headers.next().attr( "role" ), "tabpanel", "tabpanel roles" ); - equals( headers.eq( 1 ).prop( "aria-expanded" ), true, "active tab has aria-expanded" ); - equals( headers.eq( 0 ).prop( "aria-expanded" ), false, "inactive tab has aria-expanded" ); - equals( headers.eq( 1 ).prop( "aria-selected" ), true, "active tab has aria-selected" ); - equals( headers.eq( 0 ).prop( "aria-selected" ), false, "inactive tab has aria-selected" ); + equals( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab has aria-expanded" ); + equals( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded" ); + equals( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab has aria-selected" ); + equals( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" ); element.accordion( "option", "active", 0 ); - equals( headers.eq( 0 ).prop( "aria-expanded" ), true, "newly active tab has aria-expanded" ); - equals( headers.eq( 1 ).prop( "aria-expanded" ), false, "newly inactive tab has aria-expanded" ); - equals( headers.eq( 0 ).prop( "aria-selected" ), true, "active tab has aria-selected" ); - equals( headers.eq( 1 ).prop( "aria-selected" ), false, "inactive tab has aria-selected" ); + equals( headers.eq( 0 ).attr( "aria-expanded" ), "true", "newly active tab has aria-expanded" ); + equals( headers.eq( 1 ).attr( "aria-expanded" ), "false", "newly inactive tab has aria-expanded" ); + equals( headers.eq( 0 ).attr( "aria-selected" ), "true", "active tab has aria-selected" ); + equals( headers.eq( 1 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" ); }); }( jQuery ) ); diff --git a/tests/unit/progressbar/progressbar_core.js b/tests/unit/progressbar/progressbar_core.js index 2380061db..a499d858c 100644 --- a/tests/unit/progressbar/progressbar_core.js +++ b/tests/unit/progressbar/progressbar_core.js @@ -19,10 +19,10 @@ test("accessibility", function() { el.progressbar("value", 77); equals(el.attr("aria-valuenow"), 77, "aria-valuenow"); el.progressbar("disable"); - equals(el.prop("aria-disabled"), true, "aria-disabled on"); + equals(el.attr("aria-disabled"), "true", "aria-disabled on"); el.progressbar("enable"); // FAIL: for some reason IE6 and 7 return a boolean false instead of the string - equals(el.prop("aria-disabled"), false, "aria-disabled off"); + equals(el.attr("aria-disabled"), "false", "aria-disabled off"); }); })(jQuery); -- cgit v1.2.3