html – 在fontAwesome中隐藏的咏叹调效果

前端之家收集整理的这篇文章主要介绍了html – 在fontAwesome中隐藏的咏叹调效果前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
aria-hidden在fontAwesome中的作用是什么?
有必要使用它吗?为什么?或者为什么不呢?

例如,我想知道下面代码中aria-hidden =“true”的效果

<i class="fa fa-star" aria-hidden="true"></i>

请帮我.

解决方法

简而言之,它使图标对屏幕阅读器不可见,以增强可访问性.

the documentation开始:

If you’re using an icon to add some extra decoration or branding,it does not need to be announced to users as they are navigating your site or app aurally. Additionally,if you’re using an icon to visually re-emphasize or add styling to content already present in your HTML,it does not need to be repeated to an assistive technology-using user. You can make sure this is not read by adding the aria-hidden=”true” to your Font Awesome markup.

猜你在找的HTML相关文章