dlitem
Description
<dt> (definition term) and <dd> (definition description) elements must be direct children of a <dl> (definition list) element, or of a <div> that is itself a direct child of a <dl>. Placing these elements outside a <dl> breaks their semantic meaning and makes it impossible for screen readers to identify them as part of a definition list.
Example
In the following example, the <dt> and <dd> elements are used without a wrapping <dl> element. Screen readers cannot associate these elements with a definition list context, breaking the dlitem rule.
In contrast, the following code snippet correctly wraps all <dt> and <dd> elements inside a <dl> element. Screen readers can announce the term-and-description relationships, and the code does not break the dlitem rule.
How to fix?
Check if your site uses <dt> or <dd> elements outside of a <dl> element. If so, use one of the following methods to fix the issue:
- Wrap all
<dt>and<dd>elements in a<dl>element. This is the recommended solution. - If the elements are used purely for visual styling rather than for definition list semantics, replace them with semantically appropriate elements such as
<strong>and<p>.
Reference
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!