添加图片描述的最佳方法是什么?

We have a practice of always adding image descriptions in order to make Discourse accessible to people who use screen readers. What are some best ways to support adding image descriptions?

For example, is it possible for help text to show up that tells people to add an image description?

“You’ve added an image! Please add an image description before you create the topic.”

And, how do we add alt-text?

More on image descriptions

https://livingwithdisability.tumblr.com/post/124066767358/all-about-image-descriptions
https://www.perkinselearning.org/technology/blog/how-write-alt-text-and-image-descriptions-visually-impaired

3 个赞

Good question… I’ve wondered about this myself. It appears that the filename is used to create a description for the image. Then after uploading, you can tweak it in the markdown. When viewing a post with an image, you can mouse over it or click on it to look at the image bigger, and it includes the description at bottom. But I don’t know how that description works in screen readers.

If this can work, then for communities where this is especially important you can develop a culture around improving these descriptions, and moderators can also keep an eye out and edit posts to improve descriptions or send PMs to educate users.

![Irish Stout after a week in the fermenter, ready for pouring into bottles|375x500](upload://rW0hzxtwAluwFC6TAY07KT7J8IK.jpeg) 

4 个赞

I’d like to bump this.

@codinghorror is there a place to make specific requests for technical improvements here? Requiring users to rename files or supply markup is simply a non-starter. Those techniques are completely non-discoverable, but even if they weren’t, are also a bigger hurdle than most users will climb. Adding alt text need to be obvious, simple, and (critically) part of the normal process for uploading images, so that users who rely on assistive technologies can participate. IMO the best solution would be to have a pop-up on image upload that asks for descriptive text to be supplied. And at least for our forum I would even like a configuration to make supplying non-empty text mandatory.

7 个赞

OK, I think you’d need a plugin for that, perhaps start in marketplace ?

@codinghorror I meant to convey that accessibility needs to be a first-class concern that is built directly in to Discourse, not bolted on as an afterthought. (Apart from that, after a recent very bad experience with a non-official plugin and a botched upgrade, we only install official plugins).

1 个赞

pop-ups rarely improve usability, so I am not sure I agree with that.

At the moment when pasting from clipboard we do this:

A theme component could be built (no need for a plugin here)

  • That adds a big red popup
  • That highlights the word image after upload
  • That introduces an interstitial page.

I suggest starting with a theme component here prior to considering any core changes.

4 个赞

Could you point me to a theme component that has these elements? I’d like to play around with one so that I can perhaps sketch out what an alt text / image description theme component workflow would be like.

I do think a plug-in like how events works would be best though, where you insert an image and a form opens up where you type in the alt text and the image description. Then when you hit submit the image is automatically properly formatted.

I suggest starting with a theme component here prior to considering any core changes.

Sorry for the delayed reply. I have always regarded Discourse development as both thoughtful and thorough, and my perception from other threads as also led me to believe that accessibility is a priority.

Which is why I am frankly struggling to understand the reluctance here. I would describe the current situation for users as “nearly impossible to add, even if they want to / remember to” and the situation for admins as “completely impossible to remind / encourage”. Making alt-tags simpler and easier seems like incredibly low-hanging fruit that would benefit accessibility on every Discourse instance. It should be built-in, everywhere. $0.02

3 个赞

You could certainly build a blocking interstitial which prevents posting… I think you could do this with watched words – since we know the default image description is equal to the filename?

![super_breakout_1680x1050|690x431](upload://kVEmM01Hth0lkki06JdIsR4do5P.jpeg)

1 个赞

这可能是 AI 自动标记器的一个有趣目标。

IMO,这些设置应该存在

  • 上传图片时提示输入描述(默认开启)
  • 尝试使用 AI 服务自动填充图片描述(默认关闭)

我个人不希望在未经人工审核的情况下自动提交 AU 标签。

话虽如此,但经过三年,我有点怀疑 Discourse 是否会构建功能来简化图片上传的可访问性选项。

我们不是一个图片很多的论坛,但我最近有机会发布了一张图片,不得不来 Meta 查找 alt-text 功能,以确定其工作方式。它并不明显。

我注意到如今网页开发普遍越来越重视可访问性。我希望 Discourse 在上传时能提示输入 alt-text,并提供将其设为必填的选项。

1 个赞

略有相关的是,Discourse AI 现在会在检测到帖子中缺少替代文本的图片时,一次性提示用户启用 AI 生成的自动图片说明。

不过,我还是希望能在非 AI 论坛上看到作者的提示。

(不是针对 Discourse AI,而是因为到目前为止,我并不喜欢 AI 生成的替代文本,因为它提供的内容往往很平淡和/或不准确,并且忽略了上下文。AI 也许能在处理大量积压内容等批量操作方面发挥作用。但在文章或对话中,我宁愿让作者自己撰写替代文本,以表达图像的叙事重点,而不仅仅是视觉描述。)

1 个赞

未来最好的方法是社区开发一个主题组件来实现这一点。如果它受到好评,最终可能会被纳入核心。

为什么?无障碍访问,特别是,是 Discourse 应该领先的领域。

1 个赞

Discourse 确实提供了一种添加图片描述的方法。你只是不喜欢这个实现方式,并不意味着我们不是领先的! :wink:

如果你想要一个不同的实现方式,欢迎你将其作为主题组件实现,或者在 Marketplace 中付费请人来做。如果它的效果比我们现在的好,那么它就会被添加到核心中。很多改进都是这样进入核心的。

话虽如此,作为新的编辑器工作的一部分,我们将不得不重新审视用户界面的这个区域。它在计划中。

1 个赞

您是指添加页脚还是更像 ALT 文本?我之所以来到这里,是因为我正在寻找目前预期的方式来为图像添加描述,特别是为盲人添加描述,如果有的话。

1 个赞

alt 属性是图像描述,你可以在图像 markdown 语法中添加它,或者直接从帖子预览中的图像缩略图添加:slight_smile:

Markdown 示例:

![图像是 Discord AI 博客文章,由产品经理撰写,讨论 AI 自动回复器,该功能使用 AI 智能回复支持查询,需要 Discourse 自动化和 AI 插件才能运行。 (由 AI 字幕)(|230x500)](upload://6rMT7zREgcFUdeLKbbXXSqOUZLo.jpeg)

3 个赞