Skip to content
Browse files

Core Tests: Fixed ARIA tests for new .attr() method.

  • Loading branch information
scottgonzalez committed Nov 7, 2008
1 parent e751bf0 commit 8becd36f2d93ad8b9c745c07f13d9a44bf7bb1bb
Showing with 4 additions and 10 deletions.
  1. +4 −10 tests/core.js
@@ -54,18 +54,12 @@ test("tabbable - tabindex", function() {

test("aria", function() {

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');


0 comments on commit 8becd36

Please sign in to comment.
You can’t perform that action at this time.