Rule
Definition list structure
<dl> must be structured as term/description pairs.
- Rule
definition-list- WCAG 2.2
- 1.3.1 Info and Relationships (opens in a new tab) (Level A)
- Severity
- Serious
What it checks
A <dl> pairs terms, <dt>, with descriptions, <dd>. Its direct children may only be <dt>, <dd> and <div> wrappers that hold a group of them directly. The rule fails a list with any other element as a child, a wrapper with no <dt> or <dd> of its own, a description with no term before it in its group, or a group that ends on a term with no description.
Children that are not rendered, such as <script> or anything hidden with display: none, are ignored, since a reader never hears them. A <dl> with a role is not checked.
When a person decides
When a term or description in a group is hidden, often by a disclosure that opens on demand, a missing partner is sent for review rather than failed. A person needs to check that opening it brings the pair back together.
Example
Fails
<dl>
<dt>Delivery</dt>
<p>Two to three working days</p>
</dl>
Passes
<dl>
<dt>Delivery</dt>
<dd>Two to three working days</dd>
<dt>Returns</dt>
<dd>Free within 30 days</dd>
</dl>
The engine is tested against both examples.
How to fix it
Use only <dt> and <dd> inside the <dl>, each group a term followed by its descriptions, optionally wrapped in one <div>. Move other content out of the list.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.