Support Article
Javascript error on enabling accessibility
SA-2935
Summary
After enabling accessibility (PegaWAI) users are reporting the following JavaScript error while loading a portal that contains tabs.
Error Messages
'0' is null or not an object : pega_desktop_harnesstabs_12748115773.js!pega_destlop_docgadget...
Root Cause
This is happening in the "oDom[0].innerHTML = strLabel;" line below.
pega.composite.Tab.prototype.setLabel = function(strLabel) {
var o = this.cDom[1];
var id = "tabTitle";
if (strLabel.length > 16)
strLabel = strLabel.substring(0,13) + "...";
var oDom = pega.util.Dom.getElementsBy(function(el){if (el.id==id) return true; else return false;},"LABEL",o);
if(oDom[0]){
if(this.isAccessible) {
oDom = o.getElementsByTagName("a");
if(this.gadgetWrapper && this.gadgetWrapper.gadget) {
this.gadgetWrapper.gadget.setAttribute("title", strLabel);
}
}
oDom[0].innerHTML = strLabel;
this.label = strLabel;
}
}
Resolution
HFix-10178 is available to address this problem.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.