diff options
author | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
---|---|---|
committer | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
commit | 58a2577d48790c79adfd44bcfd662c980ce6cfe4 (patch) | |
tree | 523d814ea0b7b6f617fe515b186099c6e83fed72 /lib/dijit/_base/wai.js.uncompressed.js | |
parent | e470a273cf09562fb2f9c0c899002303f19c8d16 (diff) | |
parent | cc332603431102a682feda22b9cf0093a29f0176 (diff) |
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git
Diffstat (limited to 'lib/dijit/_base/wai.js.uncompressed.js')
-rw-r--r-- | lib/dijit/_base/wai.js.uncompressed.js | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/lib/dijit/_base/wai.js.uncompressed.js b/lib/dijit/_base/wai.js.uncompressed.js deleted file mode 100644 index b71b21698..000000000 --- a/lib/dijit/_base/wai.js.uncompressed.js +++ /dev/null @@ -1,109 +0,0 @@ -define("dijit/_base/wai", [ - "dojo/dom-attr", // domAttr.attr - "dojo/_base/lang", // lang.mixin - "../main", // export symbols to dijit - "../hccss" // not using this module directly, but loading it sets CSS flag on <html> -], function(domAttr, lang, dijit){ - - // module: - // dijit/_base/wai - - var exports = { - // summary: - // Deprecated methods for setting/getting wai roles and states. - // New code should call setAttribute()/getAttribute() directly. - // - // Also loads hccss to apply dj_a11y class to root node if machine is in high-contrast mode. - - hasWaiRole: function(/*Element*/ elem, /*String?*/ role){ - // summary: - // Determines if an element has a particular role. - // returns: - // True if elem has the specific role attribute and false if not. - // For backwards compatibility if role parameter not provided, - // returns true if has a role - var waiRole = this.getWaiRole(elem); - return role ? (waiRole.indexOf(role) > -1) : (waiRole.length > 0); - }, - - getWaiRole: function(/*Element*/ elem){ - // summary: - // Gets the role for an element (which should be a wai role). - // returns: - // The role of elem or an empty string if elem - // does not have a role. - return lang.trim((domAttr.get(elem, "role") || "").replace("wairole:","")); - }, - - setWaiRole: function(/*Element*/ elem, /*String*/ role){ - // summary: - // Sets the role on an element. - // description: - // Replace existing role attribute with new role. - - domAttr.set(elem, "role", role); - }, - - removeWaiRole: function(/*Element*/ elem, /*String*/ role){ - // summary: - // Removes the specified role from an element. - // Removes role attribute if no specific role provided (for backwards compat.) - - var roleValue = domAttr.get(elem, "role"); - if(!roleValue){ return; } - if(role){ - var t = lang.trim((" " + roleValue + " ").replace(" " + role + " ", " ")); - domAttr.set(elem, "role", t); - }else{ - elem.removeAttribute("role"); - } - }, - - hasWaiState: function(/*Element*/ elem, /*String*/ state){ - // summary: - // Determines if an element has a given state. - // description: - // Checks for an attribute called "aria-"+state. - // returns: - // true if elem has a value for the given state and - // false if it does not. - - return elem.hasAttribute ? elem.hasAttribute("aria-"+state) : !!elem.getAttribute("aria-"+state); - }, - - getWaiState: function(/*Element*/ elem, /*String*/ state){ - // summary: - // Gets the value of a state on an element. - // description: - // Checks for an attribute called "aria-"+state. - // returns: - // The value of the requested state on elem - // or an empty string if elem has no value for state. - - return elem.getAttribute("aria-"+state) || ""; - }, - - setWaiState: function(/*Element*/ elem, /*String*/ state, /*String*/ value){ - // summary: - // Sets a state on an element. - // description: - // Sets an attribute called "aria-"+state. - - elem.setAttribute("aria-"+state, value); - }, - - removeWaiState: function(/*Element*/ elem, /*String*/ state){ - // summary: - // Removes a state from an element. - // description: - // Sets an attribute called "aria-"+state. - - elem.removeAttribute("aria-"+state); - } - }; - - lang.mixin(dijit, exports); - - /*===== return exports; =====*/ - return dijit; // for back compat :-( -}); |