Skip to content

Addition of role='navigation' to the <ul> element causes a Lighthouse failure #459

Open
@stevejay

Description

@stevejay

If I run Lighthouse on our pagination component, Lighthouse complains that List items (<li>) are not contained within <ul> or <ol> parent elements.:

Screenshot 2022-11-30 at 19 12 09

AFAIK the 'navigation' role overrides the natural 'list' role of the <ul> element.

The addition of this role was a recent change, and the release notes link to this page to explain its addition. However, that page shows the use of the navigation role as wrapping the <ul> element, not added to it:

<div role="navigation" aria-label="Customer service">
  <ul>
    <li><a href="#">Help</a></li>
    <li><a href="#">Order tracking</a></li>
    <li><a href="#">Shipping &amp; Delivery</a></li>
    <li><a href="#">Returns</a></li>
    <li><a href="#">Contact us</a></li>
    <li><a href="#">Find a store</a></li>
  </ul>
</div>

Is there some way to avoid this role being added? It would be preferable if it was configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions