Question

1
Replies
34
Views
Close popover
Regina Siochi (ReginaS9)
Sky Solutions LLC

Sky Solutions LLC
US
ReginaS9 Member since 2019 22 posts
Sky Solutions LLC
Posted: July 15, 2020
Last activity: July 15, 2020

Reason for tabindex attr associated with harnessBody

Hello, 

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) 

window.onload=setTabIndex();

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 Experience System Architect