a:14:{s:9:"#provides";s:5:"dijit";s:9:"#resource";s:12:"_base/wai.js";s:9:"dijit.wai";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:16:"dijit.wai.onload";a:3:{s:4:"type";s:8:"Function";s:6:"source";s:1268:"dojo.provide("dijit._base.wai"); dijit.wai = { onload: function(){ // summary: // Detects if we are in high-contrast mode or not // This must be a named function and not an anonymous // function, so that the widget parsing code can make sure it // registers its onload function after this function. // DO NOT USE "this" within this function. // create div for testing if high contrast mode is on or images are turned off var div = dojo.create("div",{ id: "a11yTestNode", style:{ cssText:'border: 1px solid;' + 'border-color:red green;' + 'position: absolute;' + 'height: 5px;' + 'top: -999px;' + 'background-image: url("' + (dojo.config.blankGif || dojo.moduleUrl("dojo", "resources/blank.gif")) + '");' } }, dojo.body()); // test it var cs = dojo.getComputedStyle(div); if(cs){ var bkImg = cs.backgroundImage; var needsA11y = (cs.borderTopColor==cs.borderRightColor) || (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" )); dojo[needsA11y ? "addClass" : "removeClass"](dojo.body(), "dijit_a11y"); if(dojo.isIE){ div.outerHTML = ""; // prevent mixed-content warning, see http://support.microsoft.com/kb/925014 }else{ dojo.body().removeChild(div); } }";s:7:"summary";s:0:"";}s:17:"dijit._XhtmlRoles";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:16:"dijit.hasWaiRole";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}s:4:"role";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:109:" var waiRole = this.getWaiRole(elem); return role ? (waiRole.indexOf(role) > -1) : (waiRole.length > 0);";s:7:"summary";s:57:"Determines if an element has a particular non-XHTML role.";s:14:"return_summary";s:167:"True if elem has the specific non-XHTML role attribute and false if not. For backwards compatibility if role parameter not provided, returns true if has non XHTML role";}s:16:"dijit.getWaiRole";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}}s:6:"source";s:105:" return dojo.trim((dojo.attr(elem, "role") || "").replace(this._XhtmlRoles,"").replace("wairole:",""));";s:7:"summary";s:68:"Gets the non-XHTML role for an element (which should be a wai role).";s:14:"return_summary";s:75:"The non-XHTML role of elem or an empty string if elem does not have a role.";}s:16:"dijit.setWaiRole";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}s:4:"role";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:464:" var curRole = dojo.attr(elem, "role") || ""; if(dojo.isFF < 3 || !this._XhtmlRoles.test(curRole)){ dojo.attr(elem, "role", dojo.isFF < 3 ? "wairole:" + role : role); }else{ if((" "+ curRole +" ").indexOf(" " + role + " ") < 0){ var clearXhtml = dojo.trim(curRole.replace(this._XhtmlRoles, "")); var cleanRole = dojo.trim(curRole.replace(clearXhtml, "")); dojo.attr(elem, "role", cleanRole + (cleanRole ? ' ' : '') + role); } }";s:7:"summary";s:28:"Sets the role on an element.";s:11:"description";s:272:"In other than FF2 replace existing role attribute with new role. FF3 supports XHTML and ARIA roles so if elem already has an XHTML role, append this role to XHTML role and remove other ARIA roles. On Firefox 2 and below, "wairole:" is prepended to the provided role value.";}s:19:"dijit.removeWaiRole";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}s:4:"role";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:307:" var roleValue = dojo.attr(elem, "role"); if(!roleValue){ return; } if(role){ var searchRole = dojo.isFF < 3 ? "wairole:" + role : role; var t = dojo.trim((" " + roleValue + " ").replace(" " + searchRole + " ", " ")); dojo.attr(elem, "role", t); }else{ elem.removeAttribute("role"); }";s:7:"summary";s:129:"Removes the specified non-XHTML role from an element. Removes role attribute if no specific role provided (for backwards compat.)";}s:17:"dijit.hasWaiState";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}s:5:"state";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:195:" if(dojo.isFF < 3){ return elem.hasAttributeNS("http://www.w3.org/2005/07/aaa", state); } return elem.hasAttribute ? elem.hasAttribute("aria-"+state) : !!elem.getAttribute("aria-"+state);";s:7:"summary";s:43:"Determines if an element has a given state.";s:11:"description";s:197:"On Firefox 2 and below, we check for an attribute in namespace "http://www.w3.org/2005/07/aaa" with a name of the given state. On all other browsers, we check for an attribute called "aria-"+state.";s:14:"return_summary";s:70:"true if elem has a value for the given state and false if it does not.";s:7:"returns";s:32:"www.w3.org/2005/07/aaa", state);";}s:17:"dijit.getWaiState";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}s:5:"state";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:144:" if(dojo.isFF < 3){ return elem.getAttributeNS("http://www.w3.org/2005/07/aaa", state); } return elem.getAttribute("aria-"+state) || "";";s:7:"summary";s:40:"Gets the value of a state on an element.";s:11:"description";s:197:"On Firefox 2 and below, we check for an attribute in namespace "http://www.w3.org/2005/07/aaa" with a name of the given state. On all other browsers, we check for an attribute called "aria-"+state.";s:14:"return_summary";s:91:"The value of the requested state on elem or an empty string if elem has no value for state.";s:7:"returns";s:32:"www.w3.org/2005/07/aaa", state);";}s:17:"dijit.setWaiState";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}s:5:"state";a:1:{s:4:"type";s:6:"String";}s:5:"value";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:159:" if(dojo.isFF < 3){ elem.setAttributeNS("http://www.w3.org/2005/07/aaa", "aaa:"+state, value); }else{ elem.setAttribute("aria-"+state, value); }";s:7:"summary";s:27:"Sets a state on an element.";s:11:"description";s:185:"On Firefox 2 and below, we set an attribute in namespace "http://www.w3.org/2005/07/aaa" with a name of the given state. On all other browsers, we set an attribute called "aria-"+state.";}s:20:"dijit.removeWaiState";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}s:5:"state";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:140:" if(dojo.isFF < 3){ elem.removeAttributeNS("http://www.w3.org/2005/07/aaa", state); }else{ elem.removeAttribute("aria-"+state); }";s:7:"summary";s:32:"Removes a state from an element.";s:11:"description";s:193:"On Firefox 2 and below, we remove the attribute in namespace "http://www.w3.org/2005/07/aaa" with a name of the given state. On all other browsers, we remove the attribute called "aria-"+state.";}s:5:"dijit";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}