質問

I am trying to validate against W3C validator a page that contains:

<button role="slider"></button>

And the validator tells me:

Bad value slider for attribute role on element button

Any idea why? I can't find any explanation in the ARIA specs. I have seen in this blog post that landmark roles are not supported by the validator, but slider is a widget role. Also, another post in the same blog uses the code above as an example...

Simply feeding the code above to the validator allows to reproduce.

役に立ちましたか?

解決

The button element has Implicit ARIA Semantics in HTML5. The role must be either button, link, menuitem, menuitemcheckbox, menuitemradio or radio.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top