aboutsummaryrefslogtreecommitdiffstats
path: root/tests/core.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-11-15 04:29:08 +0000
committerScott González <scott.gonzalez@gmail.com>2008-11-15 04:29:08 +0000
commit6fb3ffad36e9ac318a186d471d60459d6b16094c (patch)
tree6bd7caa798c000272ff479866e4b5bda30d8ef81 /tests/core.js
parent0808041ad9e21a422b8f6fbd235c5631e0cf4309 (diff)
downloadjquery-ui-6fb3ffad36e9ac318a186d471d60459d6b16094c.tar.gz
jquery-ui-6fb3ffad36e9ac318a186d471d60459d6b16094c.zip
Core: Fixed #3562: Modify .removeAttr() to work on ARIA properties in FF2.
Diffstat (limited to 'tests/core.js')
-rw-r--r--tests/core.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/core.js b/tests/core.js
index 6c701de41..0836fb588 100644
--- a/tests/core.js
+++ b/tests/core.js
@@ -56,12 +56,23 @@ test("tabbable - tabindex", function() {
module('jQuery extensions');
test("attr - aria", function() {
- expect(4);
+ expect(6);
+
+ var el = $('#aria');
+
+ ok(!el.attr('role'), 'role is empty via attr');
+ equals(el.attr('role', 'tablist').attr('role'), 'tablist', 'role is tablist');
+
+ equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined');
+
+ el.attr('aria-expanded', true);
+ equals(el.attr('aria-expanded'), 'true', 'aria expanded is true');
+
+ el.removeAttr('aria-expanded');
+ equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined after removing');
- ok(!$('#aria').attr('role'), 'role is empty via attr');
- 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');
+ el.attr('aria-expanded', false);
+ equals(el.attr('aria-expanded'), 'false', 'aria expanded is false');
});
})(jQuery);