aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-11-07 13:23:02 +0000
committerScott González <scott.gonzalez@gmail.com>2008-11-07 13:23:02 +0000
commit8becd36f2d93ad8b9c745c07f13d9a44bf7bb1bb (patch)
treef4b3a5fc816001596c21feaa5ba3faf711768fbf
parente751bf0e536d7174a6c704e4826d882cbb116672 (diff)
downloadjquery-ui-8becd36f2d93ad8b9c745c07f13d9a44bf7bb1bb.tar.gz
jquery-ui-8becd36f2d93ad8b9c745c07f13d9a44bf7bb1bb.zip
Core Tests: Fixed ARIA tests for new .attr() method.
-rw-r--r--tests/core.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/core.js b/tests/core.js
index d4ec79373..ce28aea4e 100644
--- a/tests/core.js
+++ b/tests/core.js
@@ -54,18 +54,12 @@ test("tabbable - tabindex", function() {
});
test("aria", function() {
- expect(10);
+ expect(4);
ok(!$('#aria').attr('role'), 'role is empty via attr');
- ok(!$('#aria').ariaRole(), 'role is empty via ariaRole');
- equals($('#aria').ariaRole('dialog').attr('role').replace(/^wairole:/, ""), 'dialog', 'role is dialog');
- equals($('#aria').ariaRole(), 'dialog', 'role is dialog');
- equals($('#aria').ariaRole('tablist').attr('role').replace(/^wairole:/, ""), 'tablist', 'role is tablist via attr');
- equals($('#aria').ariaRole(), 'tablist', 'role is tablist via ariaRole');
- ok(!$('#aria').attr('expanded'), 'state expanded absent via attr');
- ok(!$('#aria').ariaState('expanded'), 'state expanded absent via ariaState');
- equals($('#aria').ariaState('expanded', true).ariaState('expanded'), 'true', 'aria expanded is true');
- equals($('#aria').ariaState('expanded', false).ariaState('expanded'), 'false', 'aria expanded is false');
+ equals($('#aria').attr('role', 'tablist').attr('role'), 'tablist', 'role is tablist');
+ equals($('#aria').attr('aria-expanded', true).attr('aria-expanded'), 'true', 'aria expanded is true');
+ equals($('#aria').attr('aria-expanded', false).attr('aria-expanded'), 'false', 'aria expanded is false');
});
})(jQuery);