Revision as of 07:41, 25 May 2011 editEvlekis (talk | contribs)30,289 edits clean box← Previous edit | Revision as of 07:48, 25 May 2011 edit undoCurb Chain (talk | contribs)18,691 editsNo edit summaryNext edit → | ||
Line 2: | Line 2: | ||
<!-- Hello! Feel free to try your formatting and editing skills below this line. As this page is for editing experiments, this page will automatically be cleaned every 12 hours. --> | <!-- Hello! Feel free to try your formatting and editing skills below this line. As this page is for editing experiments, this page will automatically be cleaned every 12 hours. --> | ||
{{redirect3|WP:ACCESS|This is a guide to edit articles for accessibility. For the project, see ]}} | |||
{{style-guideline|MOS:ACCESS|WP:ACCESS|WP:ACCESSIBILITY}} | |||
{{style}} | |||
{{Misplaced Pages:WikiProject Accessibility/Navigation menu| Guidelines for articles =uncollapsed}} | |||
] is the goal of making web pages easier to navigate and read. While this is primarily intended to assist those with ], it can be helpful to all readers. Articles adhering to the following guidelines are easier to read and edit by those Wikipedians with and without disabilities. | |||
== Article structure ==<!-- This section is linked from ] --> | |||
=== Lead section === | |||
As explained in detail at ], the lead section may contain optional elements presented in the following order: disambiguation links (dablinks), maintenance tags, infoboxes, images, navigational boxes (navigational templates), introductory text, and table of contents, moving to the heading of the first section. | |||
=== Headings === | |||
Headings should be descriptive and in a consistent order (See also—References—Further reading—External links). | |||
Headings should be nested sequentially, starting with level 2 (<code>==</code>), then level 3 (<code>===</code>) and so on (level 1 is not used, as this is the auto-generated page title), neither using random heading levels (e.g. selected for emphasis, which is not the purpose of headings), nor skipping parts of the sequence. | |||
{| class="wikitable" | |||
|+ style="padding-top: 10px;" | Heading use (and misuse) examples | |||
|- | |||
! style="background: PaleGreen;" | Correct | |||
! style="background: PaleVioletRed;" | Random/chaotic | |||
! style="background: PaleVioletRed;" | Skipping levels | |||
|- style="vertical-align: top;" | |||
| style="width: 30%;" | | |||
<poem> | |||
''[Article lead here]'' | |||
<code>==Section==</code> ''[level 2]'' | |||
<code>===Sub-section===</code> ''[3]'' | |||
<code>==Section==</code> ''[2]'' | |||
<code>===Sub-section===</code> ''[3]'' | |||
<code>====Sub-sub-section====</code> ''[4]'' | |||
<code>==Section==</code> ''[2]''</poem> | |||
| style="width: 30%;" | | |||
<poem> | |||
''[Article lead here]'' | |||
<code>====Section'''?'''====</code> ''[4]'' | |||
<code>===Section'''?'''===</code> ''[3]'' | |||
<code>==Section'''?'''==</code> ''[2]'' | |||
<code>==Section'''?'''==</code> ''[2]'' | |||
<code>====Section'''?'''====</code> ''[4]'' | |||
<code>===Section'''?'''===</code> ''[2]''</poem> | |||
| style="width: 30%;" | | |||
<poem> | |||
''[Article lead here]'' | |||
''[Level-2 section missing here]'' | |||
<code>===Section'''?'''===</code> ''[3]'' | |||
<code>==Section==</code> ''[2]'' | |||
''[Level-3 sub-section missing here]'' | |||
<code>====Sub-section'''?'''====</code> ''[4]'' | |||
<code>==Section==</code> ''[2]''</poem> | |||
|} | |||
=== Section structure === | |||
As explained above for the lead section, each section should have a specific structure: | |||
<pre> | |||
<!-- CORRECT CODE --> | |||
== Foo bars == | |||
{{main|Foo bar}} | |||
{{cleanup-section}} | |||
] | |||
A foo bar ... | |||
</pre> | |||
Note also that the image should be ''inside'' the section it belongs to (after the header and after any links to other articles), and not just before the header for similar reasons. | |||
=== Resolution === | |||
Misplaced Pages articles should be accessible to readers using devices with small screens, or to readers using monitors with a low resolution. The lowest resolution that it is considered possible to support without adversely affecting other users is 1024x768; all articles should look acceptable at this resolution without excessive horizontal scrolling. This is sometimes an issue in articles with multiple images on both sides of the screen; although lower resolutions will tend to stretch paragraphs vertically, moving images apart in that direction, be careful not to add images or other floating content on both sides of the screen simultaneously. Large tables and images can also create problems; sometimes horizontal scrolling is unavoidable, but consider restructuring wide tables to extend vertically rather than horizontally. | |||
== Text == | |||
# In articles, do not use ] to remove objectionable text. Either comment it out with <nowiki>"<!--" and "-->"</nowiki> or remove it entirely. By default, most ]s do not indicate presentational text attributes (bold, italic, underline) or even semantic text attributes (emphasis, importance, text deletion), so struck-out text is read normally along with any other text. (Editors who participate in Misplaced Pages policy and deletion debates are advised to turn on the sounding of text attributes when doing so, as struck text is very common in Misplaced Pages-internal discussions.) | |||
#Screen readers without Unicode support will read a character outside ] as a question mark, and even in the latest version of ], the most popular screen reader, Unicode characters are very difficult to read. | |||
## Provide a ] for all text in a non-Latin writing system where the non-Latin character is important in the original context such as names, places, things etc. | |||
## Do not use unpronounceable symbols such as ♥ (a heart symbol); use images with alt text instead.<ref>{{Cite web | url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/F26.html| title = F26: Failure of Success Criterion 1.3.3 due to using a graphical symbol alone to convey information| work = Techniques for WCAG 2.0 | accessdate=1 January 2011|publisher = ]}}</ref> | |||
## Symbols that cause problems for screen readers may already have templates created to produce an image and alt text. An example is {{tl|†}}; see ] for more. | |||
# Do not use techniques that require interaction to provide information, such as tooltips or any other "hover" text. Abbreviations are exempt from these requirements, so the {{t|abbr}} template may be used to indicate the long form of a word. | |||
# When editing, never break up a line unless absolutely necessary, as the easiest way to edit with a ] is to navigate line by line. | |||
== Links == | |||
# Create good link descriptions, especially for external links (avoid "]!", "").<ref>{{Cite web | url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/G91.html | title = G91: Providing link text that describes the purpose of a link| work = Techniques for WCAG 2.0 | accessdate = 1 January 2011| publisher = ]}}</ref><ref>{{Cite web | url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/F84 | title = F84: Failure of Success Criterion 2.4.9 due to using a non-specific link such as "click here" or "more" without a mechanism to change the link text to specific text| work = Techniques for WCAG 2.0 | publisher = ] | accessdate = 1 January 2011}}</ref> | |||
#Do not use ] characters as icons; use an icon with alt text instead. For example, a character like "→" can not be reproduced into useful text by a ], and will usually be read as a question mark. | |||
{{anchors|Using colors in articles}} | |||
== Color == | |||
{{shortcut|WP:COLOR|WP:COLOUR|WP:COLORS}} | |||
{{Also|Help:Using colours|Misplaced Pages:Manual of Style (text formatting)#Color|Category:Articles with images not understandable by color blind users}} | |||
{{otheruses-section|the use of colors in articles|the civility essay dealing with colors|Misplaced Pages:Don't edit war over the colour of templates}} | |||
] | |||
'''Colors''' are most commonly found in Misplaced Pages articles within ] and ]. To view the colors available, see ]. For technical assistance on how colors are used, see ]. | |||
Articles that use color should keep accessibility in mind, as follows: | |||
* Ensure that color is not the only method used to convey important information. Especially, do not use colored text unless its status is also indicated using another method such as an ] matched to a legend, or ]. Otherwise, ] users or readers accessing Misplaced Pages through a printout or device without a color screen will not receive that information. | |||
* Some readers of Misplaced Pages are partially or fully ]. Ensure the contrast of the text with its background reaches the AA level. Reaching AAA level is often impossible, thus AAA conformance is a bonus. Here is a selection of tools that can be used to check that the contrast is correct: | |||
**The enables you to pick colors on the page, and review their contrast thoroughly. However, be sure to only use the up-to-date "luminosity" algorithm, and not the "color brightness/difference" which is outdated. | |||
**You can also use , which is entirely up-to-date. | |||
**Several other tools exist on the web, but check if they are up-to-date before using them. Several tools are based on ]'s algorithm, while the reference is now ]'s algorithm. If the tool doesn't specifically mention that it is based on WCAG 2.0, assume that it is outdated. | |||
*Additional tools can be used to help produce graphical charts and color schemes for maps and the like. These tools are not accurate means to review contrast accessibility, but they can be helpful for specific tasks. | |||
**The helps to choose a good set of colors for a graphical chart. | |||
** provides safe color schemes for maps and detailed explanations. | |||
** or are tools for simulating color blind vision. | |||
* If an article overuses colors, and you don't know how to fix it yourself, you can ask for help from other editors. Place ({{Tl|Overcolored}}/{{tl|Overcoloured}}) on the top of the article: | |||
{{Overcolored}} | |||
== Block elements == | |||
=== Lists === | |||
{{see also|Misplaced Pages:Lists#List styles}} | |||
Do not separate items by leaving blank lines between them, even when using unordered or definition lists. If list items are separated by more than one line break, the HTML list tags will be ended, which makes it difficult to read the list with screen readers. For example: | |||
<pre>* One is a good number. | |||
* Two is a better number. | |||
* Three is the best number in the world. | |||
* But the number four should not be mentioned at all costs. | |||
</pre> | |||
will be read by a screen reader as: "List of 2 items: (bullet) One is a good number, (bullet) Two is a better number, list end. List of 1 items: (bullet) Three is the best number in the world, list end. List of 1 items: (bullet) But the number four should not be mentioned at all costs, list end." Improper formatting can more than triple the length of time it takes to read the list. | |||
==== Horizontal lists ==== | |||
For lists running across the page, the template {{tl|flatlist}} and its partner {{tl|endflatlist}} are available, to improve accessibility and semantic meaningfulness by marking up what is clearly a list, as such, rather than characters which are read out (e.g. "one dot two dot three dot...") by the kind of assistive software used by, for example, people who are blind. Alternatively, in templates and the like, such lists may be styled with the class "<code>horizontal</code>". | |||
=== Tables === | |||
Screen readers and other web browsing tools make use of specific table tags to help users navigate the data contained within them. | |||
Use the correct wikitable pipe syntax to take advantage of all the features available. See ] for more information on the special syntax used for tables. Do not solely use formatting, either from CSS or hardcoded styles, to create semantic meaning (eg, changing background colour). | |||
The technique of creating a multi-line infobox using matching embedded HTML {{tag|br|single}} tags in adjacent cells creates a visual row not reflected in the HTML table structure. This is a problem for users of screen readers which read tables cell by cell, html row by html row, not visual row by visual row. ] is addressing this problem. | |||
==== Data tables ==== | |||
*Priority: high (A accessibility level) | |||
*Difficulty: easy (blend in nicely with editorial habits) | |||
<pre> | |||
{| | |||
|+ | |||
|- | |||
! scope="col" | | |||
! scope="col" | | |||
! scope="col" | | |||
|- | |||
! scope="row" | | |||
| || | |||
|- | |||
! scope="row" | | |||
| || | |||
... | |||
|} | |||
</pre> | |||
; Caption ( <code>|+</code> ): A caption is a table's title, describing its nature.<ref name="H39" group="WCAG-TECH">, A accessibility level.</ref> | |||
; Row & column headers (<code> ! </code>): Like the caption, these help present the information in a logical structure to visitors.<ref group="WCAG-TECH">{{Cite web | url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H51 | title = H51: Using table markup to present tabular information| accessdate = 1 January 2011| publisher = ]}}</ref> The headers help screen readers render header information about data cells. For example, header information is spoken prior to the cell data, or header information is provided on request.<ref>{{Cite web | url = http://www.w3.org/TR/REC-html40/struct/tables.html#edef-TH | title= Table cells: The TH and TD elements | work = Techniques for WCAG 2.0 | publisher = ] | accessdate = 1 January 2011}}</ref> | |||
; Scope of headers (<code> ! scope="col" | and ! scope="row" | </code>): This clearly identifies headers as either row headers or column headers. Headers can now be associated to corresponding cells.<ref name="H63" group="WCAG-TECH">{{Cite web | url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H63.html | title = H63: Using the scope attribute to associate header cells and data cells in data tables| work = Techniques for WCAG 2.0 | accessdate = 1 January 2011| publisher = ]}}</ref> | |||
] provides detailed requirements about: | |||
# Correct table captions | |||
# Correct headers structure | |||
# Images and color | |||
# Avoiding nested tables | |||
==== Layout tables ==== | |||
Some ], ] templates, and ] are made using tables. | |||
Avoid using tables for layout purposes only. The best option is to use ]'s <code><div></code> blocks and style attributes because they provide flexibility. For example, see {{tlx|Navbox}}. | |||
For simple layouts tables can be an option. Especially if the only point of the table is to get a floating effect, then <code>align="right"</code> etc. will work with some browsers ] at all. This is in fact a verbose approximation of <code><div></code> plus CSS, and not the design sin known as (nested) "table layout". | |||
However, to avoid accessibility barriers, when using tables for layout purposes do not use any caption, row, or column headers, and also no <code>summary</code> attribute. These structural table elements should be used only for data tables. Do not use structural elements for presentation purposes, use style sheets. For Wiki table markup this means to avoid "!" (= <th> in XHTML) in such cases: | |||
<pre> | |||
{| class="toccolours" width="94%" | |||
| align="center" bgcolor="#ccccff" | '''Title''' | |||
|- | |||
| || | |||
|- | |||
| || | |||
|} | |||
</pre> | |||
For example, see {{tlx|Navbox}} | |||
== Other languages == | |||
{{Main|Template:Lang/doc#Rationale}} | |||
Non-English words or phrases should be encased in {{tl|lang}}, which uses ] language codes, thus: | |||
{{tnl|lang|fr|Assemblée nationale}} | |||
which renders as | |||
{{lang|fr|Assemblée nationale}}. | |||
{{strong|Rationale}}: {{tnl|lang}} enables speech synthesizers to pronounce the text in the correct language.<ref>, Techniques for WCAG 2.0, W3C, accessibility level: AA.</ref> It has many other uses; see ] for a comprehensive list of benefits. | |||
== Images == | |||
{{Further|], ], ]}} | |||
# Images should include an ], even an empty one, that acts as a substitute for the image for blind readers, search-spiders, and other non-visual users. If additional alt text is added it should be succinct, or should refer the reader to the caption or adjacent text: see ] for more information. | |||
# Images should contain a ], either using the built in image syntax or a secondary line of text. The caption should concisely describe the meaning of the image, the essential information it is trying to convey. | |||
# Where possible, any charts or diagrams should have a text equivalent, or should be well-described so that users who are unable to see the image can gain some understanding of the concept. | |||
# Detailed image descriptions, where not appropriate for an article, should be placed on the image description page, with a note saying that activating the image link will lead to a more detailed description. | |||
# Images should be inside the section they belong to (after the heading and after any links to other articles), and not in the heading nor at the end of the previous section, otherwise screen readers would read the image (and its textual alternative) in a different section. See ] for more information. | |||
# This guideline includes alt text for LaTeX-formatted equations in <nowiki><math></nowiki> mode. | |||
== Videos and animations == | |||
{{further|]|]}} | |||
In order to be accessible, an animation (] – Graphics Interchange Format) should either: | |||
* not exceed a duration of five seconds (which results in making it a purely decorative element),<ref>{{Cite web| url =http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/G152| title = Setting animated gif images to stop blinking after n cycles (within 5 seconds)| work = Techniques for WCAG 2.0 | accessdate = 1 January 2011 | publisher = ]}}</ref> or | |||
* be equipped with control functions (stop, pause, play).<ref>{{Cite web | url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/G4 | title = Allowing the content to be paused and restarted from where it was paused| accessdate = 1 January 2011| work = Techniques for WCAG 2.0 | publisher = ]}}</ref> | |||
In short, most animated GIFs should be converted to video (to learn how, see the tutorial ). | |||
Although these are not yet supported by MediaWiki as of August 2010,<ref>The conference about Kaltura's partnership with Wikimedia announced that video will get "multi-lingual timed text subtitles" in a near future. Alt text was not mentioned and its implementation might not be planned.</ref> a video also should have subtitles and a text version (]) of its content.<ref>{{Cite web | url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/G69 | title = Providing an alternative for time based media | work = Techniques for WCAG 2.0 | accessdate = 1 January 2011| publisher = ]}}</ref><ref>{{Cite web| url = http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/G158 | title = Providing an alternative for time-based media for audio-only content| work = Techniques for WCAG 2.0 | publisher = ]| accessdate = 1 January 2011}}</ref> A good way to satisfy these needs is to make sure that the information in the video is also present in the prose text of the article. | |||
== Styles and markup options == | |||
{{shortcut|WP:Deviations}} | |||
=== Best practice: Use ''Wikimarkup'' and CSS in preference to alternatives === | |||
In general, articles should use ] in preference to the limited set of allowed HTML elements. In particular, do not use the HTML style tags <tt><nowiki><i></nowiki></tt> and <tt><nowiki><b></nowiki></tt> to format text; it is preferable to use Wiki markup <tt><nowiki>''</nowiki></tt> or <tt><nowiki>'''</nowiki></tt>, or logical style tags. Of course there are natural exceptions: it may be beneficial to use <tt><nowiki><u></u></nowiki></tt> tags to indicate something like an example of an unclickable link. The <tt><nowiki><font></nowiki></tt> tag should also be avoided in article text; use logical style tags like <tt><nowiki><em></nowiki></tt>, <tt><nowiki><code></nowiki></tt>, or <tt><nowiki><strong></nowiki></tt> to emphasise semantic differences. Use <tt><nowiki><small></nowiki></tt> and <tt><nowiki><big></nowiki></tt> semantic tags to change font size, rather than setting it explicitly with the <tt><nowiki>font-size=</nowiki></tt> style attribute. | |||
In general, styles for tables and other block-level elements should be set using CSS classes, not with inline style attributes. This is because the site-wide CSS is more carefully tested to ensure compatibility with a wide range of browsers; it also creates a greater degree of professionalism by ensuring a consistent appearance between articles. Deviations from standard conventions are acceptable where they create a semantic distinction (for instance, the infoboxes and ] relating to '']'' use a yellow colour-scheme instead of the customary mauve, to tie in with the dominant colour in the series) but should not be used gratuitously. | |||
=== Users with limited CSS/JavaScript support {{anchor|Scrolling and collapsible sections}} === | |||
{{seealso|Misplaced Pages:Manual of style#Scrolling lists and collapsible content}} | |||
Misplaced Pages articles should be accessible to readers using browsers and devices which have limited or no support for JavaScript or Cascading Style Sheets. At the same time, it is recognised that it is impossible to provide the same quality of appearance to such users without unnecessarily avoiding features that would benefit users with more capable browsers. As such, features which would cause content to be hidden or corrupted when CSS and/or JavaScript is unavailable must not be used. This includes techniques such as the ] method for hiding table content — which produces incomprehensible output without CSS — and some implementations of the NavFrame collapsing code — which can make content inaccessible without JavaScript support. However, consideration for users without CSS or JavaScript should extend mainly to making sure that their reading experience is ''possible''; it is recognised that it will inevitably be ''inferior''. | |||
To accommodate these considerations, test any potentially disruptive changes with JavaScript and/or CSS disabled. In Firefox, this can be done easily with the Web Developer extension; JavaScript can be disabled in IE in the 'Options' screen. Be particularly careful with inline CSS effects, which are not supported by several browsers, media, and XHTML versions. | |||
== See also == | |||
* ] (WAI) | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
== References == | |||
=== Specific === | |||
{{reflist}} | |||
=== General === | |||
* {{cite book | |||
| first = Joe | |||
| last = Clark | |||
| year = 2003 | |||
| month = | |||
| title = Building Accessible Websites | |||
| edition = | |||
| publisher = New Riders Press | |||
| location = | |||
| id = ISBN 0-7357-1150-X | |||
| url = http://www.joeclark.org/book/ | |||
| accessdate = 1 January 2011 | |||
}} | |||
* {{cite web | |||
| first = Mark | |||
| last = Pilgrim | |||
| title = Dive Into Accessibility: 30 days to a more accessible web site | |||
| year = 2002 | |||
| accessdate = 1 January 2011 | |||
| url = http://diveintoaccessibility.org/ | |||
}} | |||
== External links == | |||
* , from WAI | |||
* | |||
* , from WAI | |||
* , from ] | |||
* | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] |
Revision as of 07:48, 25 May 2011
Welcome to this sandbox page, a space to experiment with editing.
You can either edit the source code ("Edit source" tab above) or use VisualEditor ("Edit" tab above). Click the "Publish changes" button when finished. You can click "Show preview" to see a preview of your edits, or "Show changes" to see what you have changed. Anyone can edit this page and it is automatically cleared regularly (anything you write will not remain indefinitely). Click here to reset the sandbox. You can access your personal sandbox by clicking here, or using the "Sandbox" link in the top right.Creating an account gives you access to a personal sandbox, among other benefits. Do NOT, under any circumstances, place promotional, copyrighted, offensive, or libelous content in sandbox pages. Repeatedly doing so WILL get you blocked from editing. For more info about sandboxes, see Misplaced Pages:About the sandbox and Help:My sandbox. New to Misplaced Pages? See the contributing to Misplaced Pages page or our tutorial. Questions? Try the Teahouse!
| Shortcuts |
This guideline is a part of the English Misplaced Pages's Manual of Style. It is a generally accepted standard that editors should attempt to follow, though occasional exceptions may apply. Any substantive edit to this page should reflect consensus. When in doubt, discuss first on the talk page. | Shortcuts |
Manual of Style (MoS) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Content | ||||||||||
Formatting | ||||||||||
Images | ||||||||||
Layout | ||||||||||
Lists | ||||||||||
By topic area
|
||||||||||
Related guidelines | ||||||||||
WikiProject Accessibility |
---|
Article guidelines |
Template guidelines |
Coordination |
For impaired users |
Web accessibility is the goal of making web pages easier to navigate and read. While this is primarily intended to assist those with disabilities, it can be helpful to all readers. Articles adhering to the following guidelines are easier to read and edit by those Wikipedians with and without disabilities.
Article structure
Lead section
As explained in detail at Misplaced Pages:Lead section#Elements of the lead, the lead section may contain optional elements presented in the following order: disambiguation links (dablinks), maintenance tags, infoboxes, images, navigational boxes (navigational templates), introductory text, and table of contents, moving to the heading of the first section.
Headings
Headings should be descriptive and in a consistent order (See also—References—Further reading—External links).
Headings should be nested sequentially, starting with level 2 (==
), then level 3 (===
) and so on (level 1 is not used, as this is the auto-generated page title), neither using random heading levels (e.g. selected for emphasis, which is not the purpose of headings), nor skipping parts of the sequence.
Correct | Random/chaotic | Skipping levels |
---|---|---|
|
|
|
Section structure
As explained above for the lead section, each section should have a specific structure:
<!-- CORRECT CODE --> == Foo bars == {{main|Foo bar}} {{cleanup-section}} ] A foo bar ...
Note also that the image should be inside the section it belongs to (after the header and after any links to other articles), and not just before the header for similar reasons.
Resolution
Misplaced Pages articles should be accessible to readers using devices with small screens, or to readers using monitors with a low resolution. The lowest resolution that it is considered possible to support without adversely affecting other users is 1024x768; all articles should look acceptable at this resolution without excessive horizontal scrolling. This is sometimes an issue in articles with multiple images on both sides of the screen; although lower resolutions will tend to stretch paragraphs vertically, moving images apart in that direction, be careful not to add images or other floating content on both sides of the screen simultaneously. Large tables and images can also create problems; sometimes horizontal scrolling is unavoidable, but consider restructuring wide tables to extend vertically rather than horizontally.
Text
- In articles, do not use strikethrough to remove objectionable text. Either comment it out with "<!--" and "-->" or remove it entirely. By default, most screen readers do not indicate presentational text attributes (bold, italic, underline) or even semantic text attributes (emphasis, importance, text deletion), so struck-out text is read normally along with any other text. (Editors who participate in Misplaced Pages policy and deletion debates are advised to turn on the sounding of text attributes when doing so, as struck text is very common in Misplaced Pages-internal discussions.)
- Screen readers without Unicode support will read a character outside Latin-1 as a question mark, and even in the latest version of JAWS, the most popular screen reader, Unicode characters are very difficult to read.
- Provide a transliteration for all text in a non-Latin writing system where the non-Latin character is important in the original context such as names, places, things etc.
- Do not use unpronounceable symbols such as ♥ (a heart symbol); use images with alt text instead.
- Symbols that cause problems for screen readers may already have templates created to produce an image and alt text. An example is {{†}}; see Category:Image insertion templates for more.
- Do not use techniques that require interaction to provide information, such as tooltips or any other "hover" text. Abbreviations are exempt from these requirements, so the {{abbr}} template may be used to indicate the long form of a word.
- When editing, never break up a line unless absolutely necessary, as the easiest way to edit with a screen reader is to navigate line by line.
Links
- Create good link descriptions, especially for external links (avoid "click here!", "this").
- Do not use Unicode characters as icons; use an icon with alt text instead. For example, a character like "→" can not be reproduced into useful text by a screen reader, and will usually be read as a question mark.
Color
Shortcuts See also: Help:Using colours, Misplaced Pages:Manual of Style (text formatting) § Color, and Category:Articles with images not understandable by color blind usersColors are most commonly found in Misplaced Pages articles within templates and tables. To view the colors available, see List of colors. For technical assistance on how colors are used, see Help:Using colours.
Articles that use color should keep accessibility in mind, as follows:
- Ensure that color is not the only method used to convey important information. Especially, do not use colored text unless its status is also indicated using another method such as an accessible symbol matched to a legend, or footnote labels. Otherwise, blind users or readers accessing Misplaced Pages through a printout or device without a color screen will not receive that information.
- Some readers of Misplaced Pages are partially or fully color blind. Ensure the contrast of the text with its background reaches the AA level. Reaching AAA level is often impossible, thus AAA conformance is a bonus. Here is a selection of tools that can be used to check that the contrast is correct:
- The Color Contrast Analyser enables you to pick colors on the page, and review their contrast thoroughly. However, be sure to only use the up-to-date "luminosity" algorithm, and not the "color brightness/difference" which is outdated.
- You can also use Snook's color contrast tool, which is entirely up-to-date.
- Several other tools exist on the web, but check if they are up-to-date before using them. Several tools are based on WCAG 1.0's algorithm, while the reference is now WCAG 2.0's algorithm. If the tool doesn't specifically mention that it is based on WCAG 2.0, assume that it is outdated.
- Additional tools can be used to help produce graphical charts and color schemes for maps and the like. These tools are not accurate means to review contrast accessibility, but they can be helpful for specific tasks.
- The color scheme generator helps to choose a good set of colors for a graphical chart.
- Color Brewer 2.0's provides safe color schemes for maps and detailed explanations.
- Colorfilter.wickline.org or vischeck.com are tools for simulating color blind vision.
- If an article overuses colors, and you don't know how to fix it yourself, you can ask for help from other editors. Place ({{Overcolored}}/{{Overcoloured}}) on the top of the article:
This article may overuse or misuse colour, making it hard to understand for colour-blind users. Please remove or fix instances of distracting or hard-to-read colours or remove coloured links that may impede users' ability to distinguish links from regular text, or links coloured for purely aesthetic reasons. See the guides to editing for accessibility of contrast and colour. |
Block elements
Lists
See also: Misplaced Pages:Lists § List stylesDo not separate items by leaving blank lines between them, even when using unordered or definition lists. If list items are separated by more than one line break, the HTML list tags will be ended, which makes it difficult to read the list with screen readers. For example:
* One is a good number. * Two is a better number. * Three is the best number in the world. * But the number four should not be mentioned at all costs.
will be read by a screen reader as: "List of 2 items: (bullet) One is a good number, (bullet) Two is a better number, list end. List of 1 items: (bullet) Three is the best number in the world, list end. List of 1 items: (bullet) But the number four should not be mentioned at all costs, list end." Improper formatting can more than triple the length of time it takes to read the list.
Horizontal lists
For lists running across the page, the template {{flatlist}} and its partner {{endflatlist}} are available, to improve accessibility and semantic meaningfulness by marking up what is clearly a list, as such, rather than characters which are read out (e.g. "one dot two dot three dot...") by the kind of assistive software used by, for example, people who are blind. Alternatively, in templates and the like, such lists may be styled with the class "horizontal
".
Tables
Screen readers and other web browsing tools make use of specific table tags to help users navigate the data contained within them.
Use the correct wikitable pipe syntax to take advantage of all the features available. See meta:Help:Tables for more information on the special syntax used for tables. Do not solely use formatting, either from CSS or hardcoded styles, to create semantic meaning (eg, changing background colour).
The technique of creating a multi-line infobox using matching embedded HTML <br />
tags in adjacent cells creates a visual row not reflected in the HTML table structure. This is a problem for users of screen readers which read tables cell by cell, html row by html row, not visual row by visual row. WikiProject Accessibility/Infobox accessibility is addressing this problem.
Data tables
- Priority: high (A accessibility level)
- Difficulty: easy (blend in nicely with editorial habits)
{| |+ |- ! scope="col" | ! scope="col" | ! scope="col" | |- ! scope="row" | | || |- ! scope="row" | | || ... |}
- Caption (
|+
) - A caption is a table's title, describing its nature.
- Row & column headers (
!
) - Like the caption, these help present the information in a logical structure to visitors. The headers help screen readers render header information about data cells. For example, header information is spoken prior to the cell data, or header information is provided on request.
- Scope of headers (
! scope="col" | and ! scope="row" |
) - This clearly identifies headers as either row headers or column headers. Headers can now be associated to corresponding cells.
Misplaced Pages:Manual of Style (accessibility)/Data tables tutorial provides detailed requirements about:
- Correct table captions
- Correct headers structure
- Images and color
- Avoiding nested tables
Layout tables
Some navboxes, series templates, and infoboxes are made using tables.
Avoid using tables for layout purposes only. The best option is to use HTML's <div>
blocks and style attributes because they provide flexibility. For example, see {{Navbox}}
.
For simple layouts tables can be an option. Especially if the only point of the table is to get a floating effect, then align="right"
etc. will work with some browsers not supporting CSS at all. This is in fact a verbose approximation of <div>
plus CSS, and not the design sin known as (nested) "table layout".
However, to avoid accessibility barriers, when using tables for layout purposes do not use any caption, row, or column headers, and also no summary
attribute. These structural table elements should be used only for data tables. Do not use structural elements for presentation purposes, use style sheets. For Wiki table markup this means to avoid "!" (= <th> in XHTML) in such cases:
{| class="toccolours" width="94%" | align="center" bgcolor="#ccccff" | '''Title''' |- | || |- | || |}
For example, see {{Navbox}}
Other languages
Main page: Template:Lang/doc § RationaleNon-English words or phrases should be encased in {{lang}}, which uses ISO639 language codes, thus:
{{lang|fr|Assemblée nationale}}
which renders as
Assemblée nationale.
Rationale: {{lang}}
enables speech synthesizers to pronounce the text in the correct language. It has many other uses; see Template:Lang/doc#Rationale for a comprehensive list of benefits.
Images
Further information: ]- Images should include an alt attribute, even an empty one, that acts as a substitute for the image for blind readers, search-spiders, and other non-visual users. If additional alt text is added it should be succinct, or should refer the reader to the caption or adjacent text: see WP:ALT for more information.
- Images should contain a caption, either using the built in image syntax or a secondary line of text. The caption should concisely describe the meaning of the image, the essential information it is trying to convey.
- Where possible, any charts or diagrams should have a text equivalent, or should be well-described so that users who are unable to see the image can gain some understanding of the concept.
- Detailed image descriptions, where not appropriate for an article, should be placed on the image description page, with a note saying that activating the image link will lead to a more detailed description.
- Images should be inside the section they belong to (after the heading and after any links to other articles), and not in the heading nor at the end of the previous section, otherwise screen readers would read the image (and its textual alternative) in a different section. See Misplaced Pages:Picture tutorial for more information.
- This guideline includes alt text for LaTeX-formatted equations in <math> mode.
Videos and animations
Further information: ] and ]In order to be accessible, an animation (GIF – Graphics Interchange Format) should either:
- not exceed a duration of five seconds (which results in making it a purely decorative element), or
- be equipped with control functions (stop, pause, play).
In short, most animated GIFs should be converted to video (to learn how, see the tutorial converting animated GIFs to Theora OGG).
Although these are not yet supported by MediaWiki as of August 2010, a video also should have subtitles and a text version (alt-text) of its content. A good way to satisfy these needs is to make sure that the information in the video is also present in the prose text of the article.
Styles and markup options
ShortcutBest practice: Use Wikimarkup and CSS in preference to alternatives
In general, articles should use wikimarkup in preference to the limited set of allowed HTML elements. In particular, do not use the HTML style tags <i> and <b> to format text; it is preferable to use Wiki markup '' or ''', or logical style tags. Of course there are natural exceptions: it may be beneficial to use <u></u> tags to indicate something like an example of an unclickable link. The <font> tag should also be avoided in article text; use logical style tags like <em>, <code>, or <strong> to emphasise semantic differences. Use <small> and <big> semantic tags to change font size, rather than setting it explicitly with the font-size= style attribute.
In general, styles for tables and other block-level elements should be set using CSS classes, not with inline style attributes. This is because the site-wide CSS is more carefully tested to ensure compatibility with a wide range of browsers; it also creates a greater degree of professionalism by ensuring a consistent appearance between articles. Deviations from standard conventions are acceptable where they create a semantic distinction (for instance, the infoboxes and navigational templates relating to The Simpsons use a yellow colour-scheme instead of the customary mauve, to tie in with the dominant colour in the series) but should not be used gratuitously.
Users with limited CSS/JavaScript support
See also: Misplaced Pages:Manual of style § Scrolling lists and collapsible contentMisplaced Pages articles should be accessible to readers using browsers and devices which have limited or no support for JavaScript or Cascading Style Sheets. At the same time, it is recognised that it is impossible to provide the same quality of appearance to such users without unnecessarily avoiding features that would benefit users with more capable browsers. As such, features which would cause content to be hidden or corrupted when CSS and/or JavaScript is unavailable must not be used. This includes techniques such as the hiddenStructure method for hiding table content — which produces incomprehensible output without CSS — and some implementations of the NavFrame collapsing code — which can make content inaccessible without JavaScript support. However, consideration for users without CSS or JavaScript should extend mainly to making sure that their reading experience is possible; it is recognised that it will inevitably be inferior.
To accommodate these considerations, test any potentially disruptive changes with JavaScript and/or CSS disabled. In Firefox, this can be done easily with the Web Developer extension; JavaScript can be disabled in IE in the 'Options' screen. Be particularly careful with inline CSS effects, which are not supported by several browsers, media, and XHTML versions.
See also
- Web Accessibility Initiative (WAI)
- Misplaced Pages:Accessibility advocates
- Misplaced Pages:Accessibility dos and don'ts
- Misplaced Pages:Using JAWS
- Misplaced Pages:WikiProject Accessibility
- Misplaced Pages:WikiProject Roadmap
- Misplaced Pages:WikiProject Usability
- usability:Accessibility Initiative
References
Specific
- "F26: Failure of Success Criterion 1.3.3 due to using a graphical symbol alone to convey information". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
- "G91: Providing link text that describes the purpose of a link". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
- "F84: Failure of Success Criterion 2.4.9 due to using a non-specific link such as "click here" or "more" without a mechanism to change the link text to specific text". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
- "Table cells: The TH and TD elements". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
- H58: Using language attributes to identify changes in the human language, Techniques for WCAG 2.0, W3C, accessibility level: AA.
- "Setting animated gif images to stop blinking after n cycles (within 5 seconds)". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
- "Allowing the content to be paused and restarted from where it was paused". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
- The conference about Kaltura's partnership with Wikimedia Collaborating on Collaborative Video for Misplaced Pages announced that video will get "multi-lingual timed text subtitles" in a near future. Alt text was not mentioned and its implementation might not be planned.
- "Providing an alternative for time based media". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
- "Providing an alternative for time-based media for audio-only content". Techniques for WCAG 2.0. W3C. Retrieved 1 January 2011.
General
- Clark, Joe (2003). Building Accessible Websites. New Riders Press. ISBN 0-7357-1150-X. Retrieved 1 January 2011.
{{cite book}}
: Cite has empty unknown parameter:|month=
(help) - Pilgrim, Mark (2002). "Dive Into Accessibility: 30 days to a more accessible web site". Retrieved 1 January 2011.
External links
- 10 Quick Tips to Make Accessible Web Sites, from WAI
- Colorblind web page filter
- Essential Components of Web Accessibility, from WAI
- Introduction to Web Accessibility, from WAI
- MediaWiki bug 367: Markup accessibility issues (tracking)
Cite error: There are <ref group=WCAG-TECH>
tags on this page, but the references will not show without a {{reflist|group=WCAG-TECH}}
template (see the help page).