Definition list items are wrapped in <dl> elements

Definition list items are nested inside the correct parent element.

On this page

Impact

ScanGov impact ratings

About

Definition list items (<dt> and <dd>) must be wrapped in a parent <dl> element to ensure that screen readers can properly announce them. Learn how to structure definition lists correctly.

Risks

Screen readers announce structured content incorrectly.

Why it's important

Helps screen readers announce structured content (tables, lists) in a logical order that users can understand.

User stories

As a screen reader user, I want tables and lists to be properly structured so that I can understand the relationships between items.

Code

Failing pattern:

<!-- Fail: dt and dd outside dl -->
<dt>Agency</dt>
<dd>Department of Veterans Affairs</dd>

Passing pattern:

<!-- Pass: dt and dd inside dl -->
<dl>
  <dt>Agency</dt>
  <dd>Department of Veterans Affairs</dd>
</dl>

Error

ScanGov messaging when a site fails a standard:

Failed: Definition list items are wrapped in <dl> elements

Guidance

Indicators

On this page