roles and attributes help screen readers
provide missing information about an element.
For these roles and attributes to make sense,
role supports a specific subset of
(see ARIA roles definitions).
Some ARIA child roles must be contained by specific parent roles
to properly perform their intended accessibility functions.
Lighthouse reports missing parenrts for these child roles:
Key Term: ARIA attributes let you modify the way HTML elements are represented to assitive technologies like screen readers. Learn more in this Introduction to ARIA.
How Lighthouse finds missing parent roles
Lighthouse uses the WAI ARIA specification: Definition of Roles to check for required parent roles. Any role that contains "required context role", is considered a child role to the parent(s).
Lighthouse fails this audit,
when it finds a child role that's missing its parent.
In the example Lighthouse audit above,
listitem role requires a parent
Since there's no parent role defined,
the audit fails.
This makes sense,
as it would be confusing to have a listitem without grouping into a list.
How this audit impacts overall Lighthouse score
Lighthouse flags this as a low severity issue. It is important to fix, and
probably indicates a mistaken assumption in your code. In the example above, the
element would be announced as plain text content and its
listitem role would
How to check for required parent roles
To check for required parent roles refer to the WAI ARIA Definition of Roles. ARIA explicitly defines required parent roles. Link to the child role from the specification, and check the "required context role". Make sure to include a parent role for that child role.
For more information on this audit, see Certain ARIA roles must be contained by particular parent elements.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.