Skip to main content

HTML Guide

Bad value “button” for attribute “role” on element “li”.

A <li> element, used to define a list item, does not accept the button role.

This HTML code is invalid because the <li> elements can’t have role="button":

<ul>
  <li role="button">One</li>
  <li role="button">Two</li>
</ul>

Learn more:

Related W3C validator issues