dlitem-parent-valid

Description-list items must be inside a description list

automaticWCAG 1.3.1 (A)confidence: highseverity: seriousperceivable

Checks that <dt>/<dd> elements are contained by a <dl>, directly or via one wrapping <div>.

Applies to. Applies to <dt>/<dd> elements that have a parent element.

Expectation. The parent is <dl>, or the parent is a <div> whose own parent is <dl> (a single level of wrapping div is allowed, matching how authors commonly group dt/dd pairs). A <dt>/<dd> used outside a real description-list container is not exposed as a term/definition to assistive technologies.

Examples

pass
<dl>
<dt>Term</dt>
<dd>Definition</dd>
</dl>

Both `dt` and `dd` are inside a `<dl>` ancestor.

fail
<div>
<dt>orphan</dt>
</div>

`<dt>` has no `<dl>` ancestor at all.

View source