Wikipedia:Manual of Style/Accessibility/dl tests

When using MediaWiki parser's built-in description/definition/association list shorthand markup (the ; and : syntax), there cannot be blank lines between any "terms" or "definitions" in the list, or it breaks the list markup.

Contiguous association list in MediaWiki markup

edit

View source to behold the semantic markup.

Term 1
Definition 1A
Definition 1B
Term 2 (UK)
Term 2 (US)
Definition 2
Wiki source
;Term 1
:Definition 1A
:Definition 1B
;Term 2 (UK)
;Term 2 (US)
:Definition 2
Resulting HTML
<dl>
<dt>Term 1</dt>
<dd>Definition 1A</dd>
<dd>Definition 1B</dd>
<dt>Term 2 (UK)</dt>
<dt>Term 2 (US)</dt>
<dd>Definition 2</dd>
</dl>

Association list in MediaWiki markup with blank lines

edit

View source to behold to MW vomit.

Term 1
Definition 1A
Definition 1B
Term 2 (UK)
Term 2 (US)
Definition 2
Wiki source
;Term 1

:Definition 1A

:Definition 1B

;Term 2 (UK)

;Term 2 (US)

:Definition 2
Resulting HTML
<dl>
<dt>Term 1</dt>
</dl>
<dl>
<dd>Definition 1A</dd>
</dl>
<dl>
<dd>Definition 1B</dd>
</dl>
<dl>
<dt>Term 2 (UK)</dt>
</dl>
<dl>
<dt>Term 2 (US)</dt>
</dl>
<dl>
<dd>Definition 2</dd>
</dl>

This is a semantic HTML and Web accessibility nightmare.

Association list in HTML with blank lines

edit

View source to behold the semantic markup's return

Term 1
Definition 1A
Definition 1B
Term 2 (UK)
Term 2 (US)
Definition 2
Wiki source
<dl>

<dt>Term 1</dt>

<dd>Definition 1A</dd>

<dd>Definition 1B</dd>

<dt>
Term 2 (UK)
</dt>

<dt>
Term 2 (US)
</dt>

<dd>
Definition 2
</dd>

</dl>
Resulting HTML
<dl>
<dt>Term 1</dt>
<dd>Definition 1A</dd>
<dd>Definition 1B</dd>
<dt>Term 2 (UK)</dt>
<dt>Term 2 (US)</dt>
<dd>Definition 2</dd>
</dl>