We detected an element functioning as a list missing a list role
| Field | Value |
|---|---|
| Rule code | Manual_List_Role_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.2 Name, Role, Value |
| Must be fixed at source | No |
Description
When custom elements are used to create list-like functionality, they must be assigned the appropriate ARIA role to ensure that assistive technologies understand their purpose. Without the proper role, users of screen readers and other assistive technologies may be unable to identify these elements correctly.
How to fix
When creating custom list elements, always add role="list" and appropriate ARIA attributes to ensure accessibility:
<div class="custom-list"
role="list"
> Whenever possible, use the native native <ul> or <ol> elements instead of creating custom lists, as it provides built-in accessibility and behavior.