Pregunta

I'm getting this error in W3C Validation. I'm using HTML5 doctype <!DOCTYPE html>

Bad value pagination for attribute role on element nav.

for

<nav class="pagination" role="pagination">

Does anybody knows how to solve this or What is the reason behind this? Does W3V Validator not support ARIA ?

¿Fue útil?

Solución

As the validator says, pagination is a bad value for nav element, you can use navigation instead. Validate the code below and see it yourself

<!DOCTYPE html>
<html lang="en">
   <head>
       <title>Test</title>
       <meta charset="utf-8">
   </head>
   <body>
      <nav role="navigation"> </nav>
   </body>
</html>

enter image description here

From w3org

However, in order to make the structure more accessible to user agents that support ARIA as well as ensuring that user agents that don't support HTML5 can also understand the structure, adding the ARIA role="navigation" is advised.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top