将 title 和 alt 都留空并将文本添加到隐藏段落文本中是否可以访问 wcag 2.0 AA?
is it wcag 2.0 AA accessible to leave both title and alt empty and add the text in a hidden paragraph text?
假设图片的替代文字太长,图片链接如下
<a href="http://somelink.com" title="">
<img src="someimage.png" alt=""/>
<p class="hide_text">The complete alt text here as in too long to have any meaning to put in the title/alt above. Then is it accessible enough to put in the p tag?</p>
</a>
我只是隐藏了 p 文本。那么 WCAG 2.0 AA 是否符合可访问性?如果在这种情况下 title 和 alt 都是空的并且我在 p 中包含图像 alt 文本...WCAG 2.0 AA 是否可以访问?
如果图像是锚标记内的唯一元素,则其替代文本需要描述 link 的目的地,而不是图像本身。如果这个描述太长,那么可能值得问问自己这是否合适。
这是一个边界线 WCAG pass/fail。该图像可以说不符合 1.1.1(非文本内容),因为它不是装饰性的,但没有替代文本。但是 link 本身可能会通过,因为隐藏文本使其目的地可以通过编程方式确定。
我不使用这种方法的原因有两个:
隐藏文本可能不适用于所有设备上的访问技术。我在 iPhone.
上使用 VoiceOver 时看到过这种情况
语音识别用户可能会在点击 link 时遇到困难,如果他们看到没有附带文字的图像没有给他们提供足够的信息来告诉他们如何指示识别软件点击 link.
所以总而言之,我会使用替代文本,尽量将其缩减为 link 目的地的简短描述,并确保从图像内容中可以清楚地看出如何使用语音点击它认可。
在我的案例中,我发现的最佳选择是使用如下所示的方法
<a href="http://somelink.com" title="">
<img src="someimage.png" alt=" "/>
<p class="hide_text">The complete alt text here as in too long to have any meaning to put in the title/alt above. Then is it accessible enough to put in the p tag?</p>
</a>
在 alt 中输入 space。这样NVDA读取的时候就读成Link图形link"The complete alt text here as in too long to have any meaning to put in the title/alt above. Then is it accessible enough to put in the p tag?"
好像还可以。我只是不能 100% 确定我是否违反了任何 WCAG 规则。
它不符合 WCAG AA 标准,因为如果您将 title
属性放在 A
标签上,它就不能为空。
And I just hide the p text.
只要屏幕阅读器可以阅读,您就可以隐藏它(所以不会 display: none
)...
从许多人的角度来看,它可能符合 WCAG AA 标准,但您必须记住,并非所有人都使用语音合成器,并且应该为每个人提供这种不可见的信息。
此外,link 文本应尽可能短。
假设图片的替代文字太长,图片链接如下
<a href="http://somelink.com" title="">
<img src="someimage.png" alt=""/>
<p class="hide_text">The complete alt text here as in too long to have any meaning to put in the title/alt above. Then is it accessible enough to put in the p tag?</p>
</a>
我只是隐藏了 p 文本。那么 WCAG 2.0 AA 是否符合可访问性?如果在这种情况下 title 和 alt 都是空的并且我在 p 中包含图像 alt 文本...WCAG 2.0 AA 是否可以访问?
如果图像是锚标记内的唯一元素,则其替代文本需要描述 link 的目的地,而不是图像本身。如果这个描述太长,那么可能值得问问自己这是否合适。
这是一个边界线 WCAG pass/fail。该图像可以说不符合 1.1.1(非文本内容),因为它不是装饰性的,但没有替代文本。但是 link 本身可能会通过,因为隐藏文本使其目的地可以通过编程方式确定。
我不使用这种方法的原因有两个:
隐藏文本可能不适用于所有设备上的访问技术。我在 iPhone.
上使用 VoiceOver 时看到过这种情况
语音识别用户可能会在点击 link 时遇到困难,如果他们看到没有附带文字的图像没有给他们提供足够的信息来告诉他们如何指示识别软件点击 link.
所以总而言之,我会使用替代文本,尽量将其缩减为 link 目的地的简短描述,并确保从图像内容中可以清楚地看出如何使用语音点击它认可。
在我的案例中,我发现的最佳选择是使用如下所示的方法
<a href="http://somelink.com" title="">
<img src="someimage.png" alt=" "/>
<p class="hide_text">The complete alt text here as in too long to have any meaning to put in the title/alt above. Then is it accessible enough to put in the p tag?</p>
</a>
在 alt 中输入 space。这样NVDA读取的时候就读成Link图形link"The complete alt text here as in too long to have any meaning to put in the title/alt above. Then is it accessible enough to put in the p tag?"
好像还可以。我只是不能 100% 确定我是否违反了任何 WCAG 规则。
它不符合 WCAG AA 标准,因为如果您将 title
属性放在 A
标签上,它就不能为空。
And I just hide the p text.
只要屏幕阅读器可以阅读,您就可以隐藏它(所以不会 display: none
)...
从许多人的角度来看,它可能符合 WCAG AA 标准,但您必须记住,并非所有人都使用语音合成器,并且应该为每个人提供这种不可见的信息。
此外,link 文本应尽可能短。