aria-hidden在fontAwesome中的作用是什么?
有必要使用它吗?为什么?或者为什么不呢?
有必要使用它吗?为什么?或者为什么不呢?
例如,我想知道下面代码中aria-hidden =“true”的效果
<i class="fa fa-star" aria-hidden="true"></i>
请帮我.
解决方法
简而言之,它使图标对屏幕阅读器不可见,以增强可访问性.
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.