The button
element has Implicit ARIA Semantics in HTML5. The role must be either button
, link
, menuitem
, menuitemcheckbox
, menuitemradio
or radio
.
ARIA validation error: Bad value slider for attribute role
-
04-04-2022 - |
Question
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.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow