我试图验证W3C验证器包含以下内容的页面:
<button role="slider"></button>
验证者告诉我:
元素按钮上属性角色的错误值滑块
知道为什么吗?我在ARIA规范中找不到任何解释。我见过in this blog post验证器不支持landmark
角色,但是滑块是widget
角色。另外,another post in the same blog使用上面的代码作为例子......
只需将上面的代码提供给验证器即可重现。
HTML5中的The button
element has Implicit ARIA Semantics。角色必须是button
,link
,menuitem
,menuitemcheckbox
,menuitemradio
或radio
。