Wikipedia:WikiProject Accessibility/Infoboxes
WikiProject Accessibility |
---|
![]() | This help page is a how-to guide. It explains concepts or processes used Wikipedia:Manual of Style/Accessibility It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus. |
Note: this page has been inactive for years and is believed to be outdated. It is kept as an archive and as an example of template accessibility improvement.
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.
More than one field per parameter
editFor example, the template:infobox country and template: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 parameters leader_title and leader_name are now obsolete. The next step is to update the infobox's documentation (usually in the template's talk page) removing all appearances of leader_tile and leader_name with parameters leader_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 to Category:Articles using obsolete parameters to help in this search.
More than one field per row
editSometimes 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 with area=1000 and percent_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.
You can help!
editFixes have been implemented for fields like these in {{Infobox country}} and {{Infobox settlement}}.[1][2] Please see this page's talk page for activities underway to fix other instances of this issue.