dt and dd outside a dl: orphaned definition list items
A dt or dd that is not inside a dl loses the term-description pairing entirely. squirrel finds every orphan on every page.
What an orphaned dt or dd is
<dt> and <dd> earn their meaning from the <dl> that contains them: this term goes with that description. Outside a <dl> the elements still map to term and definition roles, but the grouping that pairs them is gone, so a screen reader has no relationship to announce and the reader hears two unrelated blocks of text.
The usual cause is a component that renders a term-description pair without rendering the list around it, or a refactor that moved the wrapper and left the items behind.
What squirrel checks
One check, dlitem, at severity error. For every <dt> and <dd> it looks at the immediate parent. That parent is valid when it is a <dl>, or a <div> whose own parent is a <dl>.
- Fail with
N dt/dd element(s) not inside a dl. Items quote the first 20 characters of the element’s text, asdt: "Shipping address for...", up to ten with a count of the rest. - Pass with
All dt/dd elements are inside definition lists. - Info with
No dt/dd elements found.
Exactly one wrapper level is allowed. A <dl> containing a <section> containing the <dt> is reported, which matches HTML: only <div> may wrap a group.
How to fix it
<dl>
<dt>Shipping address</dt>
<dd>12 Rue de Rivoli, Paris</dd>
</dl>Wrap the orphans in a <dl>. If the pair is not really a term and a description, use a heading and a paragraph instead, which carry the right semantics without a container.
Where a component renders one pair at a time, render the <dl> in the parent and the <div> group in the component, so every item ships inside a list.
| Rule ID | a11y/dlitem |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 7/10 |
Enable / disable
Disable this rule
[rules]
disable = ["a11y/dlitem"]Disable all Accessibility rules
[rules]
disable = ["a11y/*"]Enable only this rule
[rules]
enable = ["a11y/dlitem"]enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.
Related rules
- a11y/definition-list: the container’s own structure.
- a11y/listitem: the same orphan problem for
<li>. - a11y/list-structure:
<ul>and<ol>with children that do not belong. - a11y/aria-required-parent: the ARIA equivalent of a missing container.
Accessibility findings ship in every audit next to the SEO, performance and agent experience rules. See Website security scan with AI for how an agent works through a report.
References
- The dt element, MDN
- The dl element, HTML Standard
- Understanding SC 1.3.1 Info and Relationships, W3C
Check your site
Run squirrel audit https://example.com and open the Accessibility section of the report. Each orphan is listed with the opening words of its text. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.