More actions
| Line 53: | Line 53: | ||
** [http://colorfilter.wickline.org/?j=1;t=a Colorfilter.wickline.org] or [http://www.vischeck.com/vischeck/vischeckURL.php vischeck.com] are tools for simulating color blind vision. | ** [http://colorfilter.wickline.org/?j=1;t=a Colorfilter.wickline.org] or [http://www.vischeck.com/vischeck/vischeckURL.php vischeck.com] are tools for simulating color blind vision. | ||
= Block elements = | |||
== Lists == | |||
''See also: [[Wikipedia:Help:Lists|Wikipedia:Lists]] | |||
Do not separate list items by leaving empty lines or tabular column breaks between them. This includes items in a [[description list]] (a list made with a leading colon) or an [[unordered list]] | Do not separate list items by leaving empty lines or tabular column breaks between them. This includes items in a [[Wikipedia:Description list|description list]] (a list made with a leading colon) or an [[Wikipedia:Unordered list|unordered list]]. These excessive double line breaks also disrupt [[Wikipedia:Screen reader|screen readers]], which will announce multiple lists when only one was intended, and therefore may mislead or confuse users of these programs. Improper formatting can also more than triple the length of time it takes them to read the list. Likewise, do not switch between list marker types (colons, asterisks or hash signs) in one list, unless embedding lists starting at the highest level. | ||
For example, in a discussion, | For example, in a discussion, {{dothis|do this best practice:}} | ||
<pre> | <pre> | ||
| Line 68: | Line 67: | ||
</pre> | </pre> | ||
or {{ | or {{dothis|this acceptable practice:}} | ||
<pre> | <pre> | ||
| Line 75: | Line 74: | ||
</pre> | </pre> | ||
but {{ | but {{notthis|don't do this:}} | ||
<pre> | <pre> | ||
| Line 82: | Line 81: | ||
</pre> | </pre> | ||
or {{ | or {{notthis|this:}} | ||
<pre> | <pre> | ||
| Line 90: | Line 89: | ||
</pre> | </pre> | ||
=== Indentation === | |||
:''See also [[Wikipedia:Wikipedia:Indentation|Wikipedia:Indentation]]'' | |||
Colons (:) at the start of a line mark that line as part of an HTML definition list. The visual effect in most web browsers is to indent the line. This is used, for example, to indicate replies in a threaded discussion on Talk pages. This is not ideal for accessibility or semantics, but is currently in wide use. Blank lines should not be placed between indented lines of text, as they are interpreted by the software as marking the end of a list and the start of a new one. If a blank line is needed, place the same number of colons on it as those preceding the text below the blank line, for instance: | Colons (:) at the start of a line mark that line as part of an HTML definition list. The visual effect in most web browsers is to indent the line. This is used, for example, to indicate replies in a threaded discussion on Talk pages. This is not ideal for accessibility or semantics, but is currently in wide use. Blank lines should not be placed between indented lines of text, as they are interpreted by the software as marking the end of a list and the start of a new one. If a blank line is needed, place the same number of colons on it as those preceding the text below the blank line, for instance: | ||
| Line 102: | Line 100: | ||
</pre> | </pre> | ||
=== Vertical lists === | |||
==== Bulleted vertical lists ==== | |||
For bulleted vertical lists, do not separate items by leaving blank lines between them. If list items are separated by more than one line break, the [[WP:HTML|HTML]] list will be ended before the line break, and another HTML list will be opened after the line break. This effectively breaks what is seen as one list into several smaller lists for those using [[screen | For bulleted vertical lists, do not separate items by leaving blank lines between them. If list items are separated by more than one line break, the [[Wikipedia:WP:HTML|HTML]] list will be ended before the line break, and another HTML list will be opened after the line break. This effectively breaks what is seen as one list into several smaller lists for those using [[Wikipedia:Screen reader|screen readers]]. For example, for the coding: | ||
<pre>* White rose | <pre>* White rose | ||
| Line 124: | Line 122: | ||
but will be read by a screen reader as: "List of 2 items: (bullet) White rose, (bullet) Yellow rose, list end. List of 1 items: (bullet) Pink rose, list end. List of 1 items: (bullet) Red rose, list end." | but will be read by a screen reader as: "List of 2 items: (bullet) White rose, (bullet) Yellow rose, list end. List of 1 items: (bullet) Pink rose, list end. List of 1 items: (bullet) Red rose, list end." | ||
Do not separate list items with line breaks ({{tag|br|o}}) | Do not separate list items with line breaks ({{tag|br|o}}). | ||
==== | ==== Unbulleted vertical lists ==== | ||
For unbulleted lists running down the page, the templates {{tl|plainlist}} and {{tl|unbulleted list}} are available, to improve accessibility and semantic meaningfulness by marking up what is clearly a list rather than including {{Tag|br|single}} line breaks, which should not be used—see above. They differ only in the wiki-markup used to create the list. Note that because these are templates, the text of each list item cannot contain the vertical bar symbol ( | ) unless it is replaced by <code><nowiki>{{!}}</nowiki></code> or is contained within {{tag|nowiki}} tags. | For unbulleted lists running down the page, the templates {{tl|plainlist}} and {{tl|unbulleted list}} are available, to improve accessibility and semantic meaningfulness by marking up what is clearly a list rather than including {{Tag|br|single}} line breaks, which should not be used—see above. They differ only in the wiki-markup used to create the list. Note that because these are templates, the text of each list item cannot contain the vertical bar symbol ( | ) unless it is replaced by <code><nowiki>{{!}}</nowiki></code> or is contained within {{tag|nowiki}} tags. | ||