A11y错误:链接没有可分辨的名称 [英] A11y error: Links do not have a discernible name
本文介绍了A11y错误:链接没有可分辨的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个错误:
链接没有可分辨的名称链接文本(以及
图片的替代文本,当用作链接时),
可以辨别,独特且可聚焦,从而改善了屏幕阅读器用户的导航体验。了解更多
。
Links do not have a discernible name Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users. Learn more.
我试图添加一个aria标签,但它不起作用。这会导致错误:
I tried to include an aria-label but it doesn't work. This makes an error:
<a href="https://...../demo/index.php/Products/Description/Apple-Cinema-27/products_id-1" c="Apple Cinema 27">
<img src="images/products/130_61ajN-dgGxL._SL1000_.jpg"
alt="Apple Cinema 27"
title="Apple Cinema 27"
width="130"
height="130"
class="media-object img-fluid">
</a>
谢谢
推荐答案
也许alt属性只需要稍作修改。 alt属性应标识链接的目的地或目的。这是一个非常简化的示例:
Perhaps the alt attribute just needs a slight modification. The alt attribute should identify the destination or purpose of the link. Here is a very simplified example:
<a href="contact.html">
<img src="contact.png" alt="Return to the contact page">
</a>
因此,您可能不需要aria标签属性。
You may not therefore need an aria-label attribute.
这篇关于A11y错误:链接没有可分辨的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文