List Item Context
Checks that li elements are inside ul, ol, or menu
Checks that li elements are inside ul, ol, or menu
| Rule ID | a11y/listitem |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 7/10 |
Solution
The <li> element must be contained within a <ul>, <ol>, or <menu> element. Orphaned list items lose their semantic meaning. Wrap them in an appropriate list container.
Enable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["a11y/listitem"]Disable all Accessibility rules
squirrel.toml
toml[rules]
disable = ["a11y/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["a11y/listitem"]
disable = ["*"]