Template:Infobox ship begin/sandbox

From Wiki
Jump to: navigation, search


Ship article infoboxes are tables that contain several infoboxes – {{Infobox ship begin}}, {{Infobox ship image}}, {{Infobox ship career}}, {{Infobox ship characteristics}}. This version of {{Infobox ship begin/sandbox}} puts a table caption at the top of the infobox. The purpose of that is for accessibility - so those with screen readers can more easily navigate the ship article.

To accomplish this, {{Infobox ship begin/sandbox}} introduces a new parameter |infobox caption=.

When |infobox caption= is omitted or present but empty, the template acts as it did previously: the ship article infobox does not have a caption.

When the parameter reads |infobox caption=yes or |infobox caption=nodab, the template uses the article title.

|infobox caption=yes formats the infobox caption in the same way that the article title is formatted.
|infobox caption=nodab formats the infobox caption in the same way except that the parenthetical disambiguator is not displayed.

When |infobox caption= is present and has an assigned value other than the keywords yes or nodab, that value is used as the infobox caption. Infobox caption text formatting is the responsibility of the editor.

The formatting uses code derived from that which the ship article infobox uses to format the article title – the code started with the code in {{italic title prefixed}}. For this reason, the same constraints apply. If an article title currently requires {{italic title prefixed}} or {{DISPLAYTITLE}} for proper formatting, {{Infobox ship begin/sandbox}} will not properly format the infobox caption. To apply formatting, the article title must contain a recognizable ship prefix as defined by {{ship prefix}}. Without a ship prefix, the caption will be rendered without formatting.