Вопрос

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