aboutsummaryrefslogtreecommitdiffstats
path: root/ui
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 /ui
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 'ui')
-rw-r--r--ui/ui.core.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index 3b6beb329..7601588b3 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -135,9 +135,10 @@ $.ui = {
};
// WAI-ARIA normalization
-// tweak $.attr for FF2 implementation
if (isFF2) {
var attr = $.attr,
+ removeAttr = $.fn.removeAttr,
+ ariaNS = "http://www.w3.org/2005/07/aaa",
ariaState = /^aria-/,
ariaRole = /^wairole:/;
@@ -150,11 +151,18 @@ if (isFF2) {
: (attr.apply(this, arguments) || "").replace(ariaRole, ""))
: (ariaState.test(name)
? (set
- ? elem.setAttributeNS("http://www.w3.org/2005/07/aaa",
+ ? elem.setAttributeNS(ariaNS,
name.replace(ariaState, "aaa:"), value)
: attr.call(this, elem, name.replace(ariaState, "aaa:")))
: attr.apply(this, arguments)));
};
+
+ $.fn.removeAttr = function(name) {
+ return (ariaState.test(name)
+ ? this.each(function() {
+ this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
+ }) : removeAttr.call(this, name));
+ };
}
//jQuery plugins