加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

在某些情况下,是否适合html img标记的alt =“”?

发布时间:2020-12-14 21:38:34 所属栏目:资源 来源:网络整理
导读:我们有一个关于Web可访问性遵从性的项目。大约一个星期从发射我们有无障碍委员会审查我们的网站给最后的赞许。不过,他们向我们报告说,我们应该在某些图标上设置alt =“”,因为它们不会向网站提供任何额外的内容,因此只是分散了屏幕阅读器的注意力,但没
我们有一个关于Web可访问性遵从性的项目。大约一个星期从发射我们有无障碍委员会审查我们的网站给最后的赞许。不过,他们向我们报告说,我们应该在某些图标上设置alt =“”,因为它们不会向网站提供任何额外的内容,因此只是分散了屏幕阅读器的注意力,但没有收益。

>这是正确的吗?
>我是在印象下是img的必需属性?在img标签上确定alt =“”将包含alt属性,但这是否有效?

评论赞赏

解决方法

如果图标提供任何功能(用户可点击或某些东西),我建议设置一个描述性的alt值。如果他们只是装饰,那么alt =“”是有效的。

从the standard:

While alternate text may be very helpful,it must be handled with care. Authors should observe the following guidelines:

  • Do not specify irrelevant alternate text when including images intended to format a page,for instance,alt=”red ball” would be inappropriate for an image that adds a red ball for decorating a heading or paragraph. In such cases,the alternate text should be the empty string (“”). Authors are in any case advised to avoid using images to format pages; style sheets should be used instead.
  • Do not specify meaningless alternate text (e.g.,“dummy text”). Not only will this frustrate users,it will slow down user agents that must convert text to speech or braille output.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读