技术写作与文档2021jakearchibald.com编辑精选
写好替代文本:情感很重要
Writing Great Alt Text: Emotion Matters
导读
本文讨论如何为图片写好 alt 文本(替代文本),核心观点是:除了描述画面内容,还应当传达图片里的情绪,因为许多后天失明的读者仍保有视觉记忆和情感期待。对写作者来说,这篇文章提供了一个可迁移的练习:先问这段文字替代的是什么、读者失去它会错过什么,再决定详略与语气。评论区还补充了判断 alt 文本好坏的具体检验方法。
可以直接用的写作要点
- 01
当图片旁边紧挨着同样的文字(如头像旁的名字)时,alt 应留空,避免读屏用户听到重复内容。
- 02
判断 alt 文本好坏有个笨办法:关掉图片加载,只看剩下的文字,看它是否仍然说得通、不冗余。
- 03
写图片描述前先想读者的背景:对后天失明者,情绪和氛围值得写;对纯装饰图,一句都不必写。
- 04
信息准确永远优先,情感描写是语境允许时的加分项,不要为抒情牺牲关键内容。
HN 评论精选
紧邻姓名的头像应留空 alt,可用“关闭图片加载”来检验 alt 是否冗余
在“Jake Archibald”(人名)和“Avatar”(头像)这两个高票选项里,我认为这两个都是错的。“Jake Archibald”是最差的选择,因为这个名字紧接着就会出现在正文里,读屏用户会听到“Jake Archibald Jake Archibald”;在常被屏蔽图片的 HTML 邮件里,还会出现 alt 文本被拆成多行、被截断或与别的内容重叠的乱象。“Avatar”也好不到哪去,图像在这里是装饰性的,这个词对读屏用户毫无帮助。我建议用关掉图片加载的方式检验 alt 文本:这时若 alt 只是重复名字或写“头像”,立刻就能看出它们没用。名字就显示在头像旁边时,正确做法是留空 alt;如果头像旁边没有名字,才应该把名字写进 alt。
chrismorgan查看英文原文
> 15.4% "Jake Archibald" > 13.8% "Avatar" I declare those 29.2% unequivocally wrong. “Jake Archibald” is the worst option, completely useless as alt text, because the name “Jake Archibald” follows immediately afterwards. This is one of my pet peeves, avatars that have alt text of the name that immediately follows in normal text, especially in HTML emails where images are much more likely to not be rendered, and so you end up seeing things like “Jake ArchibaldJake Archibald” or “{Jak / e / Arc / …} Jake Archibald” (spreading the alt text across many lines, either then truncated or overlapping with something else). “Avatar” is almost as bad, because it doesn’t help screen readers in any way—the image is behaving more decoratively than functionally. In fact, I think the HTML email stuff I mentioned suggests a good way of assessing alt text: turn off image loading so that you actually do see the alt text, and decide then whether it was a good idea or not. In this case, “Jake Archibald” is definitely right out, and “Avatar” isn’t useful. So yeah, the two options that remain are empty alt text, and something custom. In web systems in general where the name appears beside the avatar, I’d say empty alt text is absolutely the right choice: the avatars are then purely decorative and not useful to non-visual users. (If the avatar doesn’t have a name shown alongside it, you should almost certainly use the name as both the title and alt attributes.) In specific cases like this, “Jake, cheekily peering from behind a plant” is good, where “Jake Archibald hiding behind a plant” didn’t feel right. Mind you, this is where my remarks about seeing the alt text fall down a little, because although I might want to hear it, I actually wouldn’t want to see this particular alt text, so at least in an HTML email I’d probably try to visually hide the alt text, e.g. `<img style="color:transparent">` should work in most clients, though I don’t know if it’d do for the MSO renderer that Outlook/Windows Mail use.)
先天失明者容易忽略“多数盲人有视觉记忆”,情绪描述对后天失明者尤其有意义
文章引用的 Léonie Watson 那句话让我停了一下:“盲人,尤其是那些曾经有过视力的盲人(我们大多数人都是如此)。”我怀疑,像我们这样天生失明的人常常会忘记这一点,我大概就是。我没有数据,但据我猜测,在积极推动无障碍的盲人中,占比最大的可能正是先天或幼年失明者——我在网上认识的盲人大多如此。顺便说,我属于法定盲(不能开车),但不是全盲:近距离能读文字,却几乎无法理解图片,大概因为幼年没被训练过看图,父母和老师觉得我能读印刷字就满意了。所以我确实意识不到图片里可能错过的情绪内容,也因此在这类讨论里把自己归为盲人。
mwcampbell查看英文原文
The following phrase from the linked article by Léonie Watson [1] jumped out at me: > blind people, particularly those who once had sight (and that's most of us) I wonder if those of us who have been blind from birth tend to forget that. I'm pretty sure I do. And while I don't have data on this, my guess is that the largest proportion of blind people who are active in advocating for accessibility have been blind from birth or early childhood. That's certainly true of most, if not all, of the blind people I know online. BTW, while I'm legally blind (i.e. can't drive), I'm not totally blind. But while I can read text up close, I seem to have very little ability to make sense of pictures even up close, presumably because I was never trained to do that at a young age; my parents and teachers were probably satisfied that I could read print. So I'm certainly unaware of any emotional content I might be missing in an image, and that's why I classify myself as blind for the purpose of this discussion. [1]: https://tink.uk/text-descriptions-emotion-rich-images/
alt 只能是纯字符串,缺乏分段和强调等结构,限制了复杂图片的描述
我希望 alt 文本能有更多内部结构。只有一个字符串是不够的:没法分段、没法用项目符号、没法强调文字,也没法加链接。它更该接近 figcaption 元素,而不是一个纯字符串。
zetalyrae查看英文原文
I wish alt text could have more internal structure. A string is not good enough: you can't separate the text into paragraphs, or have bullet points, or emphasize text or link to anything. Something closer to the figcaption[0] element than a string. [0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption
信息优先,情感是语境性的加分项而非必需
情感确实可能重要,但不该成为硬性要求。信息才是最重要的,其余的在特定语境下是锦上添花。
willio58查看英文原文
Emotion can matter but should not be required. Information is most important, the rest is nice to have in certain contexts.
同类还值得读
编写更好文档的框架
A Framework for Writing Better Documentation
这是 Divio 的文档写作框架,把技术文档按「读者的目标」分成四类:教程(学习导向)、操作指南(问题导向)、参考(信息导向)、解释(理解导向)。
技术写作与文档2021 · 637 分 · 76 评4 条写作要点编辑精选写好一份设计文档
Writing a good design document
这篇 HN 帖子标题为《Writing a good design document》,主题是如何写好一份设计文档;对写作者来说,它值得作为技术写作和结构化说明文的参照。
技术写作与文档2025 · 581 分 · 147 评3 条写作要点编辑精选技术写作课程
Technical Writing Courses
这是 Google 官方免费技术写作课程(两门),讲受众定义、主动语态、短句、文档结构等基础方法。
技术写作与文档2020 · 571 分 · 73 评4 条写作要点编辑精选写出更好的错误信息
Write better error messages
这篇帖子讨论如何写出更好的错误信息,评论补充了开发者场景下的具体做法和真实反面案例。
技术写作与文档2022 · 566 分 · 253 评4 条写作要点编辑精选写一本技术书的经济账
The Economics of Writing a Technical Book
一位技术书作者拆解写书的真实经济账:版税收入往往远低于投入的时间成本。
技术写作与文档2018 · 519 分 · 149 评4 条写作要点编辑精选