简体   繁体   English

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

[英]What is the limit of character to use in alt=“text” according to WCAG 2.0?

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

there is no limit explicitly set, but conventionally they are limited to 1024 chars. 没有明确设置限制,但通常它们仅限于1024个字符。 I believe that I have heard that the search engines will go no further than about 200 characters. 我相信我听说搜索引擎不会超过200个字符。 What is the use case? 用例是什么? There is a longdesc attribute that may be of interest... 有一个longdesc属性可能是有意义的...

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

WCAG says: WCAG说:

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. 地图,图表和图表是包含理解页面消息所必需的信息但过于复杂而无法用255个字符描述的图像示例。

and if you really need an alternative description longer than that, you can always use longdesc . 如果你真的需要一个比这更长的替代描述,你总是可以使用longdesc

您知道,在撰写本文时,HTML5不支持longdesc属性。

The rule is 150 characters for the text associated with alt ...Also, the rule is 150 characters maximum for <title> tag as well. 规则是用于与相关联的文本150个字符 alt ...此外,规则是最大为150个字符<title>标记为好。

See here: http://www.totalvalidator.com/support/reference/wai2.html as well -- this validates against WCAG version 2. 请参见此处: http//www.totalvalidator.com/support/reference/wai2.html - 这符合WCAG第2版的要求。

More: 更多:

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

http://www-03.ibm.com/able/guidelines/web/webimages.html 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. 我还应该注意,即使WCAG改变其限制,150个字符左右仍然是一个很好的一般规则,因为许多旧的屏幕阅读器不会超过150个字符。

According to the recent WCAG2, there is no numerical limit anymore. 根据最近的WCAG2,不再有数字限制。 Technique G94 says: 技术G94说:

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. WCAG2是自2008年12月以来在无障碍领域的官方W3C推荐。其他“规则”和标准(美国的508条款,法国的RGAA和Accessiweb等)如果愿意,可能或多或少地限制WCAG2,但它不是WCAG2了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM