我正在尝试针对 W3C 验证器验证包含以下内容的页面:
<button role="slider"></button>
验证器告诉我:
Bad value slider for attribute role on element button
知道为什么吗?我在 ARIA 规范中找不到任何解释。
我见过in this blog post验证器不支持 landmark
角色,但 slider 是一个 widget
角色。另外,another post in the same blog使用上面的代码作为示例...
只需将上面的代码输入验证器即可进行重现。
最佳答案
The button
element has Implicit ARIA Semantics在 HTML5 中。角色必须是 button
、link
、menuitem
、menuitemcheckbox
、menuitemradio
或 radio
。
关于html - ARIA 验证错误 : Bad value slider for attribute role,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16034052/