List Structure
Checks that ul and ol elements contain only li elements
Checks that ul and ol elements contain only li elements
| Rule ID | a11y/list-structure |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 7/10 |
Solution
Lists (<ul> and <ol>) should only contain <li> elements as direct children. For custom components, you can also use elements with role=‘listitem’. Move other content inside <li> elements.
Enable / Disable
Disable this rule
[rules]
disable = ["a11y/list-structure"]
Disable all Accessibility rules
[rules]
disable = ["a11y/*"]
Enable only this rule
[rules]
enable = ["a11y/list-structure"]
disable = ["*"]