문제

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