GitHub

List Item Context

Checks that li elements are inside ul, ol, or menu

Checks that li elements are inside ul, ol, or menu

Rule IDa11y/listitem
CategoryAccessibility
ScopePer-page
Severityerror
Weight7/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 = ["*"]

Type to search…

↑↓ navigate ↵ open esc close