Accessibility Guideline I Don't Understand

时间:2015-07-08 15:54:01

标签: html5 accessibility

I'm looking over a list of guidelines for compliance with the Americans with Disabilities Act. I don't understand this one:

When text is not available use the title attribute

What on Earth does this mean? When would text not be "available"?

2 个答案:

答案 0 :(得分:4)

“当文字不可用时” - 任何时候你有内容意味着要传达某些东西但没有文字解释它。因此,虽然图形图标适用(即使图像本身有文本),但是没有标签的文本输入也是如此。

W3C - Using the title attribute to identify form controls when the label element cannot be used

但是,不用于通信的图像不应包含它(这里的示例是一个波浪线):

W3C - Using null alt text and no title attribute on img elements for images that AT should ignore

完整文件:W3C - Techniques for WCAG 2.0

答案 1 :(得分:2)

Well Stack Overflow has several of these. Look at the top bar to the left of your reputation. You'll see several buttons. What are these buttons, I wonder?

Thanks to the title attribute being appropriately set, we can find out!

Example Image