Definition list items are not wrapped in <dl>
elements
— Updated
Appears in: Accessibility audits
Definition list items (<dt>
and <dd>
) must be wrapped in a parent <dl>
element to ensure that screen readers and other assistive technologies can properly announce them.
How this Lighthouse audit fails #
Lighthouse reports when definition list items are not wrapped in <dl>
elements:
How to fix orphaned definition list items #
Wrap all definition list items in parent dl
elements to ensure the list follows the proper hierarchy.
Definition list items require dl
elements around the list, dt
elements for each term, and dd
elements for each definition. Each set of dt
elements must be followed by one or more dd
elements. For example:
<dl>
<dt>Trail shoe</dt>
<dd>Extra grip for uneven, natural survaces, such as forest trails.</dd>
<dt>Road shoe</dt>
<dd>Extra cushioning for hard surfaces, such as sidewalks and roads.</dd>
</dl>
Resources #
- Source code for Definition list items are not wrapped in
<dl>
elements audit <dt>
and<dd>
elements must be contained by a<dl>
(Deque University)
Last updated: — Improve article