ReginaS9 Member since 2019 21 posts
Sky Solutions LLC
Posted: 3 months ago
Last activity: 3 months 1 week ago

Reason for tabindex attr associated with harnessBody


We have a requirement to remove the tabindex=0 from <body> class=harnessBody to meet accessibility guidelines.  Having tabindex=0 associated with the <body> sets focus on the <body> with no visible focus indicator when user presses Tab key to navigate the portal.  (image attached)

I have tried to apply some code to remove the tabindex attribute or set tabindex="-1" to remove the <body> from the tab order, which runs on window.onload  but the tabindex reverts back to a value of "0" once the user presses the Tab key.  (code below applied to harness) 


function setTabIndex(){   $(".harnessBody").attr("tabindex", "-1"); }

  • Is there a particular reason why Pega sets the <body> with tabindex="0"? 
  • Does anyone have any OOTB suggestions on how to remove tabindex or set "tabindex" to "-1"?
  • Does anyone have any suggestion on how to edit the code so that it prevents the tabindex from reverting back to tabindex="0"?  
Pega Customer Service 8.3 User Interface System Architect
Share this page LinkedIn