Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Unable to add tabindex in anchor tag using RTE

Avatar

Level 5

Hi All,

I came to a scenario where I need to create an anchor tag without href attribute using RTE component. I am able to create anchor tag using HTML option in RTE, but the thing is that anchor tag is getting skipped by tab index and never focused. Then I tried adding attribute tabindex=0 so that that anchor tag get focus, but that tabindex=0 attribute is not getting persist in html. Any idea why it is not allowed and how I can fix this in RTE? Thank you in advance!

 

Example

I am adding below syntax in HTML of RTE  

<a tabindex=0 class="new-class">click here</a>

 

In DOM the HTML element I am seeing this

<a class="new-class">click here</a>

 

Expected rendition

    <a tabindex=0 class="new-class">click here</a>

5 Replies

Avatar

Community Advisor

Can you please check antisamy rules at /libs/cq/xssprotection/config.xml?
Search for 'tabindex'

Also check in case if you have overlay of this file under /apps.

Shubham_borole_0-1645538522234.png

 

Avatar

Community Advisor

Hi @RashidJorvee 

 

Cant you just add a "#" as link for the anchor tag?

 

Thanks,

Kiran Vedantam.