问题描述
对于具有单个产品的多个图像(例如不同角度)的网页.每个图像都需要 alt
标签吗?
在亚马逊上查看示例,似乎它们在第一个产品图片上只有一个 alt
标签,但是之后没有 alt
标签或 aria
相关标签.
此处的第一个示例表示星星的空 alt
标签.
我的问题是,要遵循适当的标准,是否需要在第一张图片后添加一个空的 alt
标签?要使用 aria-hidden
完全隐藏多余的无用(相同角度的东西)图像,或者仅执行Amazon的操作,而只在第一个图像上放置 alt
标签
还有一个问题,产品图片本身甚至是相关内容吗?如果产品标题已经存在,那么将其完全隐藏以供屏幕阅读器使用会不会更容易.
首先不要使用Amazon作为如何实现可访问性的示例-他们的网站不是一个很好的例子(他们尝试过,但是他们有多年的不良做法,他们很难解决).
答案取决于所销售的产品.
例如,如果它是一个杯子,上面放着一只狗和一只猫的照片,那么单个图像alt标签可能是正确的选择,并从屏幕阅读器中隐藏其余图像.
但是,如果它是一个复杂的产品,具有显示尺寸,规格,功能等的不同图像,则可能需要多个alt标签.
要问的问题是"该图片是否描绘了任何可能影响购买决定的新信息".
如果答案为是,则添加一个alt标签;如果答案为否,则将其隐藏在屏幕阅读器中.
修改-解决针对问题的修改
从纯粹的可访问性和规则"的角度来看-不,如果图像的每个方面都在其他地方进行了描述,则不需要对图像进行Alt描述.
但是,实际上,应始终至少有一个带有产品说明的Alt标记.
alt标签的想法是为盲人用户提供尽可能多的信息和与视觉用户相似的体验(我知道,不仅盲人用户使用屏幕阅读器,而且为了简单起见,请耐心等待.)>
但是,同时,盲人用户也将感谢您为他们提供尽可能少的信息,从而为他们提供与有视觉感受的用户相同的体验.
有视力的用户将首先看到图像,盲人也应该看到图像,这在文档流程中将是有意义的,但请调整您的替代描述以提供主要描述中缺少的信息,从而避免屏幕阅读器用户的信息重复很多.
(略微远离可访问性,但在为何始终至少拥有一个alt标签方面仍然有意义)不要忘了SEO-您希望该产品图片尽可能显示在图片搜索中,尤其是在在商业环境中,alt标签仍然可以帮助搜索引擎对图像进行分类.
关于是否应至少具有一个alt标签的最后一个论点是禁用图像以节省带宽的人们所发生的事情-您仍应至少具有一个alt标签来描述图像的含义.(另一种类型的可访问性",但仍然有用).
tl; dr->是,至少还有一个alt标签.
For a webpage with multiple images of a single product, such as with different angles. Is there a requirement for alt
tags for each image?
Viewing examples on Amazon it seems they only have an alt
tag on the first product image, but after which there is no alt
tag or aria
related tags.
The first example here says that the stars have empty alt
tags.
My question is, to follow proper standards, is it required to have an empty alt
tag after the first image? To completely hide the extra non-helpful(same thing different angle) images using aria-hidden
or to just do what Amazon did and only put an alt
tag on the first image.
EDIT: One more question, are product images themselves even relevant content? If the product title is already there, wouldn't it be easier to just hide the images completely for screen-readers.
First don't use Amazon for examples of how to do accessibility - their site is not a good example (they try, but they have years of bad practices that are hard for them to work around).
The answer to this depends on the product being sold.
For example if it is a mug with a picture of a dog and a cat cuddling then a single image alt tag would probably be the right option and hide the rest of the images from the screen reader.
However if it was a complex product with different images showing dimensions, specs, features etc. then multiple alt tags may be appropriate.
The question to ask is 'does this image portray any new information that would influence a decision to buy'.
If the answer is yes, add an alt tag, if the answer is no, hide it from a screen reader.
EDIT - To Address the Edit Made To The Question
From the perspective of pure accessibility and 'rules' - no, Alt descriptions are not needed for images if every single aspect of the image is described elsewhere.
However, in practice, there should always be at least one Alt tag with a useful description of the product.
The idea of alt tags is to provide blind users with as much information and as similar an experience as possible as sighted users (I am aware not only blind users use screen readers but for simplicity of explanation bear with me).
At the same time however, a blind user will also thank you for providing them with the least amount of information possible to give them the same experience as a sighted user.
A sighted user would see an image first and so should a blind person as it will make sense in the document flow, but adjust your alt description to provide information that is missing from the main description so as to avoid too much duplication of information for screen reader users.
Also (wandering away from accessibility a bit but still relevant as to why to always have at least one alt tag) don't forget SEO - you want that product image to show up in image search if at all possible, especially in a commercial setting, alt tags still help search engines categorise images.
The final argument for whether you should have at least one alt tag is what happens for people who disable images to save on bandwidth - you should still have at least one alt tag to describe what the image(s) should be about. (a different type of 'accessibility' but still relevant).
tl;dr -> yes have at least one alt tag still.
这篇关于同一产品的多个图像,可访问性要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!