Template:Image alt: Difference between revisions
Appearance
Automated sync from wiki-stories repository |
Automated sync from wiki-stories repository |
||
| Line 1: | Line 1: | ||
<includeonly>[[File:{{{file|{{{1}}}}}|frameless|alt={{{alt|{{{caption|}}}}}}|class={{{class|infobox-image}}}]]</includeonly><noinclude> | <includeonly>[[File:{{{file|{{{1}}}}}|frameless|{{#if:{{{alt|}}}|alt={{{alt|}}}|{{#if:{{{caption|}}}|alt={{{caption|}}}|}}}|class={{{class|infobox-image}}}]]</includeonly><noinclude> | ||
Optional '''Template:Image alt''' helper. Infobox templates use inline <code>[[File:...|alt=...]]</code> markup directly; this template remains for manual use or body images. | |||
Parameters: | Parameters: | ||
| Line 9: | Line 7: | ||
* caption / 3 — fallback alt text when alt is empty | * caption / 3 — fallback alt text when alt is empty | ||
* class — CSS class on the img element (default: infobox-image) | * class — CSS class on the img element (default: infobox-image) | ||
</noinclude> | </noinclude> | ||
Revision as of 02:57, 21 June 2026
Optional Template:Image alt helper. Infobox templates use inline ... markup directly; this template remains for manual use or body images.
Parameters:
- file / 1 — image filename (without the File: prefix)
- alt / 2 — alt text for screen readers
- caption / 3 — fallback alt text when alt is empty
- class — CSS class on the img element (default: infobox-image)