[英]All my HTML tags that use FontAwesome seem to some have aria-hidden="true" added to them. How is this happening?
I'm currently using Bootstrap 4 and FontAwesome on my website.我目前在我的网站上使用 Bootstrap 4 和 FontAwesome。 I'm working on ADA compliance now.
我现在正在研究 ADA 合规性。
The crazy thing is that it seems that every HTML tag that uses FontAwesome somehow gets aria-hidden="true" added to it.疯狂的是,似乎每个使用 FontAwesome 的 HTML 标签都以某种方式添加了 aria-hidden="true" 。 Is this by default?
这是默认的吗? How do I prevent this from occurring?
我如何防止这种情况发生?
I've looked through to see if I can find that being added on any JavaScript files, but I'm not seeing anything.我已经查看了是否可以找到添加到任何 JavaScript 文件中的内容,但我什么也没看到。
It's fine that the tags get it, but not the anchor tags.标签得到它很好,但不是锚标签。
If you're using the CDN, it's possible that the auto-accessibility option is enabled, which is designed to automatically inject the aria-hidden
tags for you.如果您使用的是 CDN,则可能启用了自动辅助功能选项,该选项旨在为您自动注入
aria-hidden
标签。
https://cdn.fontawesome.com/help#qa-autoa11y
https://cdn.fontawesome.com/help#qa-autoa11y
If enabled as a feature in your embed code, Font Awesome CDN will try to identify [accessibility scenarios] in your UI as well as provide the modern and proper syntax assistive technologies recognize.
如果在您的嵌入代码中作为一项功能启用,Font Awesome CDN 将尝试在您的 UI 中识别 [可访问性场景],并提供现代和正确的语法辅助技术识别。 For icons that have semantic or interactive meaning, this means you'll need to provide a proper text alternative to be used.
对于具有语义或交互意义的图标,这意味着您需要提供一个合适的替代文本来使用。
Log into your Font Awesome kit, choose the Settings tab, and confirm that the checkbox for Auto-Accessibility is unchecked under the Features section.登录您的 Font Awesome 工具包,选择“设置”选项卡,并确认“功能”部分下的“自动辅助功能”复选框未选中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.