Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top