由于我们针对 WCAG 2.0 优化了 HTML 标记,因此我们在 google 搜索结果(包括我们的 google 站点搜索)中有很多(有时是丑陋的)图像描述。有谁知道从结果描述中隐藏它们的方法?
例子:
<h1>fiscal authority</h1>
<img src="..." alt="The image shows the entrance of the fiscal authority" />
<p>
The fiscal authority is...
</p>
搜索结果:
Fiscal authority
----------------
The Image shows the entrance of the fiscal authority The fiscal authority is...
我们不可以...
- ...将图片移到内容之外
- ...提供一个空
alt=""
属性 - ...渲染后使用 javascript 插入图像或替代文本
- 有关详细信息,请参阅http://www.w3.org/TR/WCAG20-TECHS/H37.html
使用屏幕阅读器的访问者应该获得替代文本。我相信这应该是 WCAG 的一个常见问题,我想听听其他开发人员是如何解决这个问题的?