Wikipedia:Manual of Style/Accessibility/dl tests
This is an essay on Wikipedia:Manual of Style/Accessibility. It contains the advice or opinions of one or more Wikipedia contributors. This page is not an encyclopedia article, nor is it one of Wikipedia's policies or guidelines, as it has not been thoroughly vetted by the community. Some essays represent widespread norms; others only represent minority viewpoints. |
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
editView 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
editView 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
editView 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>
|