Accessibility Insights

Back to Info and Examples for Accessibility Insights for Web

dlitem

All <dt> and <dd> elements must be contained by a <dl> element.

Why it matters

A definition list is a list of terms (words or phrases), and their definitions. The <dt> and <dd> elements must be contained by a <dl> element.

When an assistive technology encounters a definition list that’s poorly structured, it might respond in an unexpected way. As a result, people who use assistive technologies might find it difficult to interpret the list.

How to fix

Contain all <dt> and <dd> elements in a <dl> element.

Example

 

Fail

These terms and definitions are not contained in a <dl> element. Assistive technologies might not present them as part of a definition list.
<h3>Glossary</h3>
<dt>Coffee</dt>
<dd>A beverage prepared from the roasted seeds of various Coffea species.</dd>
<dt>Tea</dt>
<dd>A beverage prepared from the cured leaves of Camellia sinensis.</dd>

 

Pass

The terms and definitions are contained in a <dl> element. Assistive technologies can present the list correctly.
<h3>Glossary</h3>
<dl>
<dt>Coffee</dt>
<dd>A beverage prepared from the roasted seeds of various Coffea species.</dd>
<dt>Tea</dt>
<dd>A beverage prepared from the cured leaves of Camellia sinensis.</dd>
</dl>

About this rule

This rule passes if:

  • <dt> or <dd> element has a parent <dl> element

More examples