如何使 Font Awesome 元素具有可识别的名称?
How To Make Font Awesome Elements Have Discernable Names?
你好,
尝试使用 Lighthouse 解决可识别字体名称 icons/elements 的审计点,我不知道如何应对这一挑战:如何使字体 Awesome 元素具有可识别名称?
actual result in Lighthouse求"Elements Have Discernable Names"
这是基本代码
<a href="https://twitter.com/blablabla"><i class="fa fa-twitter black"></i></a>
此致
J.
添加 aria-label 属性 以通过审核。
<a href="https://twitter.com/blablabla" aria-label="twitter"><i class="fa fa-twitter black"></i></a>
有关 aria-label 的更多信息,请访问 https://dev.opera.com/articles/ux-accessibility-aria-label/#accessible-name-calculation
你好,
尝试使用 Lighthouse 解决可识别字体名称 icons/elements 的审计点,我不知道如何应对这一挑战:如何使字体 Awesome 元素具有可识别名称?
actual result in Lighthouse求"Elements Have Discernable Names"
这是基本代码
<a href="https://twitter.com/blablabla"><i class="fa fa-twitter black"></i></a>
此致
J.
添加 aria-label 属性 以通过审核。
<a href="https://twitter.com/blablabla" aria-label="twitter"><i class="fa fa-twitter black"></i></a>
有关 aria-label 的更多信息,请访问 https://dev.opera.com/articles/ux-accessibility-aria-label/#accessible-name-calculation