alt="text" 中使用的字符限制是多少?根据 WCAG 2.0?

发布于 2024-08-11 16:56:49 字数 42 浏览 3 评论 0 原文

根据 WCAG 2.0,alt="text" 中使用的字符限制是多少?

What is the limit of character to use in alt="text" according to WCAG 2.0?

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

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

发布评论

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

评论(4

傲影 2024-08-18 16:56:49

没有明确设置限制,但通常限制为 1024 个字符。我相信我听说搜索引擎的长度不会超过 200 个字符。使用案例是什么?有一个可能令人感兴趣的 longdesc 属性...

http://www.w3.org/TR/REC-html40/struct/objects.html#adef-longdesc-IMG

there is no limit explicitly set, but conventionally they are limited to 1024 chars. I believe that I have heard that the search engines will go no further than about 200 characters. What is the use case? There is a longdesc attribute that may be of interest...

http://www.w3.org/TR/REC-html40/struct/objects.html#adef-longdesc-IMG

倒数 2024-08-18 16:56:49

WCAG 说:

有时图像价值一千
字。地图、图表和图表是
包含的图像示例
理解所必需的信息
页面的消息但太复杂
将在255下描述
字符。

如果您确实需要比这更长的替代描述,您可以随时使用longdesc

WCAG says:

Sometimes images are worth a thousand
words. Maps, Graphs and Charts are
examples of images that contain
information necessary to understanding
the message of a page but too complex
to be described in under 255
characters.

and if you really need an alternative description longer than that, you can always use longdesc.

爺獨霸怡葒院 2024-08-18 16:56:49

根据最近的WCAG2,不再有数量限制。
技术 G94 说:

提供短文本替代
具有相同服务的非文本内容
目的并呈现相同的
信息作为非文本内容

领域的官方 W3C 建议。其他“规则”和标准(美国第 508 条、法国 RGAA 和 Accessiweb 等)可能比 WCAG2 或多或少具有限制性如果他们愿意的话,但现在已经不再是 WCAG2 了。

According to the recent WCAG2, there is no numerical limit anymore.
Technique G94 says:

Providing short text alternative for
non-text content that serves the same
purpose and presents the same
information as the non-text content

And WCAG2 is the official W3C recommendation in the accessibility field since december 2008. Other "rules" and criteria (Section 508 in US, RGAA and Accessiweb in France, etc) can be more or less restrictive than WCAG2 if they want to but it's not WCAG2 anymore.

离鸿 2024-08-18 16:56:49

对于与 alt 关联的文本,规则为 150 个字符...此外,对于 </code> 标记,规则最多为 150 个字符,如下所示出色地。

请参阅此处:http://www.totalvalidator.com/support/reference/wai2.html 以及 - 这针对 WCAG 版本 2 进行验证。

更多信息:

http:// /www6.sfgov.org/index.aspx?page=76

http://www-03.ibm.com/able/guidelines/web/webimages.html

我还应该注意,即使 WCAG 更改其限制,150 个字符左右仍然是一个很好的常规规则,因为许多较旧的屏幕阅读器不会阅读超过 150 个字符。

The rule is 150 characters for the text associated with alt...Also, the rule is 150 characters maximum for <title> tag as well.

See here: http://www.totalvalidator.com/support/reference/wai2.html as well -- this validates against WCAG version 2.

More:

http://www6.sfgov.org/index.aspx?page=76

http://www-03.ibm.com/able/guidelines/web/webimages.html

I should also note that, even if the WCAG changes its limit, 150 characters or so is still a good general rule, since many older screen-readers won't go through more than 150 characters.

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