Definition list items are not wrapped in <dl> elements

How to fix the dlitem accessibility rule. Page structure and lists.

The message you saw

Lighthouse and PageSpeed Insights
Definition list items are not wrapped in <dl> elements
axe-core, axe DevTools and this checker
<dt> and <dd> elements must be contained by a <dl> (rule dlitem)

Lighthouse runs axe-core inside it, so both are the same check, and the fix below works whichever tool showed you the message.

What it means

The <dt> (term) and <dd> (description) elements only make sense inside a description list, <dl>. This message means a <dt> or <dd> sits somewhere else: directly in a <div>, a <section>, or a <dl> whose role was changed.

axe-core accepts a <dt> or <dd> whose parent is a <dl>, or a plain <div> that is itself directly inside a <dl> (the allowed way to group pairs for styling).

Who is affected

A <dt> or <dd> isn't inside a <dl>, so the term and its description aren't announced as a pair.

Screen-reader users: outside a <dl>, the term and description lose their relationship and aren’t announced as a pair (success criterion 1.3.1 Info and Relationships).

How to find it

  1. Run the checker; it outlines each stray <dt> or <dd>.
  2. Inspect it in DevTools and look at the parent (and the grandparent, if the parent is a <div>).

How to fix it

  1. Wrap the <dt>/<dd> pairs in a <dl>.
  2. If they are already in a <div> for styling, make sure that <div> sits directly inside the <dl> and has no role.
  3. If the <dl> has a role such as role="list" that isn’t needed, remove it; roles other than list, none or presentation break the structure.

Example

Before

<div class="specs">
  <dt>Size</dt><dd>Medium</dd>
</div>

After

<dl class="specs">
  <dt>Size</dt><dd>Medium</dd>
</dl>

WCAG success criteria

When this rule fails, the page fails:

Check your fix

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.

An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.

Related fix guides

More detail