当前位置: 动力学知识库 > 问答 > 编程问答 >

Font Awesome support for screen readers and accessibility

问题描述:

According to the Font Awesome home page:

Font Awesome won't trip up screen readers, unlike other icon fonts.

I also know that it is recommended to add the aria-hidden="true" attribute to font icons so that screen readers can ignore them.

My question is, what does Font-Awesome do that "won't trip up screen readers" (I had a look on their GitHub site and I can't find anything) and do I still need to add the aria-hidden="true" attribute?

网友答案:

They are just plain talking out of the nether regions of their anatomy. What is an icon font other than an image? Their icon fonts do not have text alternatives when presented purely as an icon. On OS X with Safari, they are read out as unintelligible characters and not with a description of what the icon is...so...how should I say this diplomatically....

FONT AWESOME'S ICONS ARE NOT ACCESSIBLE!!!

Just to illustrate, here is the markup for their "buyselladds" icon

<i class="fa fa-buysellads"></i>

I can see no description of the icon. Can you? How can this possibly be accessible?

网友答案:

Best case:

<a href="https://www.facebook.com/#" title="Your title">
  <i class="fa fa-facebook" aria-hidden="true"></i>
  <span class="screen-reader-text">We are on Facebook</span>
</a>
分享给朋友:
您可能感兴趣的文章:
随机阅读: