哪种替代文本最适合屏幕阅读器,例如“微笑的孩子”?

发布于 2024-08-25 13:09:09 字数 391 浏览 4 评论 0原文

为一张微笑着坐在花园里的孩子的照片写 ALT 文本哪个会比较好?

这个

alt="Photo of smiling kid sitting in the garden"

或这个

alt="Photo of smiling kid"

或这个

alt="Smiling kid sitting in the garden"

或这个

alt="Smiling kid"

我的目的是问这个问题,我想知道我们是否应该在每个替代文本中包含“...的照片”以及我们应该在替代文本中描述多少照片。

Which would be good write ALT text for a photo of kid which is smiling and sitting in garden?

This

alt="Photo of smiling kid sitting in the garden"

or this

alt="Photo of smiling kid"

or this

alt="Smiling kid sitting in the garden"

or this

alt="Smiling kid"

my purpose is to ask this question, I want to know should we include "Photo of..." in every alt text and And how much we should describe the photo in alt text.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

昔梦 2024-09-01 13:09:09

这取决于上下文,但在不遗漏重要信息的情况下尽可能简短。作为屏幕阅读器用户,我喜欢简短的替代文本,这样我就不必听大量毫无意义的描述。 alt=“微笑的孩子的照片”太长。Jaws 宣布它正在读取图形,因此 alt=“微笑的孩子”会更好,因为它节省了我不必听的两个单词。只输入以下信息important 在 alt 标签中 例如,如果孩子在花园里这一事实并不重要,则不要将其放在 alt 标签中 如果孩子在花园里这一事实是读者必须知道的关键信息。然后将其放入 alt 标签中。

It depends on the context but make it as short as possible without leaving out important information. As a screen reader user I like short alt text that gets to the point so I don't have to listen to lots of pointless descriptions. alt="Photo of smiling kid” is too long. Jaws announces the fact that it’s reading a graphic so alt=”smiling kid” would be better since it saves two words I don’t have to listen to. Only put information that is important in the alt tag. For example if the fact that the kid is in a garden isn’t important don’t put it in the alt tag. If the fact that the kid is in a garden is critical information that the reader must know then put it in the alt tag.

梦一生花开无言 2024-09-01 13:09:09

根据经验,替代文本应该是您通过“电话”向某人朗读该页面时所说的内容。

一张图片胜过一千个单词,但其中只有一些单词在上下文中是重要的。根据使用的上下文,相同的图像将具有不同的替代内容。例如,在照片库网站上,图像是主要内容,并且图像的描述是适当的。用于在文章中营造气氛的同一张图像不会贡献任何实际内容,因此 alt="" 会更好。

使用 Lynx 测试您的网页,这是查看是否需要更改替代文本的好方法,因为它没有传达您需要传达的所有信息,或者在上下文中没有意义。

已故的伟大艾伦·弗拉维尔 (Alan Flavell) 写了一篇关于该主题的精彩文章,其中我认为必不可少的阅读。

As a rule of thumb, the alt text should be what you would say if you were reading the page out to somebody over the 'phone.

A picture is worth one thousand words, but only some of those words are important in context. The same image will have different alternative content depending on the context it is used in. For example, on a photo gallery site, the image is the primary content, and a description of the image would be appropriate. The same image used to create a mood on an article, doesn't contribute any actual content so alt="" would be better.

Test your webpages using Lynx, it is a very good way to seeing if you need to change alt text because it isn't conveying everything you need to convey or doesn't make sense in context.

The late, great Alan Flavell wrote an excellent article on the subject which I consider essential reading.

深陷 2024-09-01 13:09:09

为什么不遵循标准呢? WCAG 2.0 指南“1.1.1 非文本内容”表示,对于用于装饰或格式化目的的内容(例如图像),应以辅助技术(例如屏幕阅读器)可以忽略它的方式实现它们。如果“微笑的孩子”是装饰性的,则使用空的 alt="" 属性。

http://www.w3.org/WAI/WCAG20/quickref/ #text-equiv-all

Why not follow the standards? WCAG 2.0 guideline "1.1.1 Non-text Content" says that for content (e.g. images) that are used for decorative or formatting purposes then they should be implemented in a way that assistive technology (e.g. screen readers) can ignore it. If the "smiling kid" is decorative, then use an empty alt="" attribute.

http://www.w3.org/WAI/WCAG20/quickref/#text-equiv-all

痴意少年 2024-09-01 13:09:09

它确实不在这里也不在那里。替代文本应描述图像显示的内容,并且可能会得到页面上文本的支持,但具体的详细程度由您决定。

It's really here nor there. The alt text should describe what the image shows, and will likely be supported by text on the page, but what level of detail you go to is down to you to decide.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文