Skip to main content

HTML Guide

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

The value group is not a valid value for the role attribute on an li element according to the W3C HTML specification.

The role attribute defines the semantic purpose of an element for assistive technologies. Common valid ARIA roles for li elements are listitem, not group. The role group is intended for container elements such as ul, ol, or div when grouping related widgets, not for individual list items.

To fix this, remove the role="group" attribute from the li element.

Incorrect:

<ul>
  <li role="group">Item 1</li>
  <li role="group">Item 2</li>
</ul>

Correct:

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>

For most cases with HTML lists, native semantics suffice and no role attribute is needed for li.

Learn more:

Related W3C validator issues