| WikiProject Accessibility |
|---|
For impaired users |
This help page is ahow-to guide. It explains concepts or processes usedWikipedia:Manual of Style/Accessibility It is not one ofWikipedia's policies or guidelines, and may reflect varying levels ofconsensus. |
| Thisessay is currently inactive or at one time hadcommunity consensus, but is no longer relevant. It is retained forhistorical reference. This page is kept as an example of template accessibility improvement. It was last substantively updated 2011. |
The technique of creating "extra" lines within an infobox by adding XHTML breaks (i.e.<br />) to matching cells of a single XHTML row creates an accessibility problem, primarily for blind users. This page provides a description of the problem and suggestions for how to fix it. A project to find and fix instances of this problem is currently underway.
For example, thetemplate:infobox country andtemplate:infobox settlement both had a single "leader" row, created from the contents of a pair of parameters one specifying the title and the other specifying the leader's name. For countries/cities with multiple leaders it was common to overload the single pair of parameters sort of like the following:
| leader_title = President<br />Vice President | leader_name = Tweededum<br />Tweedledee
The result is two "rows" where the parameters are set up to allow only one. The problem is that this ends up generating HTML somewhat like:
<tr> <td> President<br />Vice President</td> <td> Tweedeldum<br />Tweedeldee</td> </tr>
which is clearly one row. So who cares as long as it looks OK? Well, if you use a screen reader instead of a visual browser, the audible presentation follows the XHTML structure, presenting table content top to bottom, row by row, cell by cell. So you hear:
President Vice President – Tweedeldum Tweedledee
instead of:
President – Tweedledum
Vice President – Tweedledee
This is not too bad, but if there are 5 lines of leaders with unfamiliar titles and unfamiliar names it gets significantly difficult to match the title to the name.
The suggested fix is to add a number of (optional) parameters, like
| leader_title1 = President | leader_name1 = Tweedledum | leader_title2 = Vice President | leader_name2 = Tweedledee
so the old parametersleader_title andleader_name are now obsolete. The next step is to update the infobox's documentation (usually in the template's talk page) removing all appearances ofleader_tile andleader_name with parametersleader_tile1,leader_name1,leader_tile2,leader_name2, and so on.
The final step is to modify all articles calling the template with the obsolete parameters. But if these parameters are optional maybe not all articles linking to the template will need modification. In this case the template can add those articles toCategory:Articles using obsolete parameters to help in this search.
Sometimes there are enough parameters, but each field doesn't have its own row but some related fields are grouped in the same cell adding XHTML breaks. For example:
| '''[[List of countries and outlying territories by area|Area]]'''<br />Water (%)| <br />{{{area}}} km<sup>2</sup><br />{{{percent_water}}}Which looks like this:
| -Area -Water (%) | {{{area}}} km2 {{{percent_water}}} |
which is again one row. So if this template is called for example witharea=1000 andpercent_water=1% a screen reader will read "Area, Water (%), 1000 km2, 1%" instead of "Area, 1000 km2, Water (%), 1%", which is the correct order.
In this case it is easier to fix this problem because only the template should be changed, i.e. because no new parameters are added no changes should be made in articles using this template.
Fixes have been implemented for fields like these in{{Infobox country}} and{{Infobox settlement}}.[1][2] Please see this page'stalk page for activities underway to fix other instances of this issue.