Jump to navigation Jump to search
60 bytes added ,  11:45, 30 April 2012
fix a few links
It is used to build ''article message box'' templates such as {{tl|source}}. It offers several different colours, uses default images if no image parameter is given and it has some other features.
This meta-template uses the ambox CSS classes in [[MediaWiki:Common.css]]. The classes can also be used directly in a [[Help:Table|wikitable]] if special functionality is needed. See the [[Wikipedia:Wikipedia:Ambox CSS classes|how-to guide]] for that.
=== Usage ===
:'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter.
:'''An image''' = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems.)
:: Often an icon is [[Wikipedia:Wikipedia:Alternative text for images#Purely decorative images|purely decorative]] in the W3C sense that it repeats the text. To improve [[Wikipedia:Accessibility|accessibility]], it is desirable to not have it be announced by [[screen reader]]s, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "{{para|link}}{{para|alt}}". For example:
:::<code><nowiki>image = [[File:Unbalanced scales.svg|40px|link=|alt=]]</nowiki></code>
:: Conversely, an icon that does not use "{{para|link}}{{para|alt}}", and which therefore is announced to visually impaired readers, should use an "{{para|alt|<var>[[Wikipedia:Wikipedia:Alternative text for images|alt text]]</var>}}" parameter that describes the icon. With no {{para|link}} parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
:::<code><nowiki>image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]</nowiki></code>
:: With a nonempty "{{para|link|<var>Page</var>}}" the alt text should describe the icon's function. For example:
:::<code><nowiki>image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]</nowiki></code>
:: An icon whose license requires attribution may have alt text, but ''must keep the default link''. Although public domain images do not require a link, many licenses do require one. Please see ''[[Wikipedia:Wikipedia:Alternative text for images#Purely decorative images|Purely decorative images]]'' for more information about licensing.
:'''none''' = Means that no image is used.
:<s>'''blank'''</s> = This parameter is now deprecated. If you see it in use, change it to "image=none".
Other pages:
* [[Wikipedia:Wikipedia:Ambox CSS classes]] – Describes how to use the ambox CSS classes directly in [[Help:Table|wikitable]]s and [[HTML element#Tables|HTML tables]].* [[Wikipedia:Wikipedia:Article message boxes]] – The style guideline for creating article message boxes.
* [[Wikipedia talk:Article message boxes]] – For discussion about these matters.


Navigation menu