Aria-label attribute is stripped from HTML in knowledge articles & blocks. How to enable?

Mary Gerhardt
Tera Contributor

We want to add the aria-label attribute to links in knowledge articles and blocks. We're using button styling on the links and have a limited amount of space for text on the button, so we can't change the link text itself to provide extra context. The body of the article provides context, but some screen reader users opt to read only interactive content on the page, and they lose the extra information about the link. When we add the aria-label attribute for accessibility, it's stripped out by the text editor, TinyMCE. Is there a way to enable the aria-label code? 

1 REPLY 1

jsanjuan
ServiceNow Employee
ServiceNow Employee
There is an option to add 'aria-label' to the script include HTMLSanitizerConfig < https://[your-instance]service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=f672f983c312010016194ffe5bba8f5c >
HTML_WHITELIST : {
globalAttributes: {
attribute:["aria-label"],
attributeValuePattern:{}
},
},