Skip to main content
Checks that definition lists contain only dt and dd elements
Rule IDa11y/definition-list
CategoryAccessibility
ScopePer-page
Severityerror
Weight7/10

Solution

Definition lists (<dl>) should only contain <dt> (term) and <dd> (description) elements as direct children. Optionally, they can be wrapped in <div> for styling. Do not put other elements like <p>, <span>, or <li> directly inside <dl>.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["a11y/definition-list"]

Disable all Accessibility rules

squirrel.toml
[rules]
disable = ["a11y/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/definition-list"]
disable = ["*"]