This page experiments with different image formats and combinations of alt and caption text.
The "Image Alt" column shows the "<img alt=..." attribute contents. MediaWiki guarantees there is always an "alt=" attribute in the HTML so if it is blank in this table then it is present and blank.
The "Link Title" column shows the "<a title=..." attribute of the hyperlink that is followed when the image is clicked. This attribute appears as a tooltip in Internet Explorer but does not seem to be used by Firefox. It is not read out by screen readers. For the thumbnail and frame images, there is never a title attribute for the image hyperlink but the little/big box icon has a title "Enlarge", which appears as a tooltip on Internet Explorer.
I've chosen to refer to the last parameter in the File (or Image) wiki markup as the "unnamed parameter". Most of the Wiki help calls this the "caption", which is misleading as it isn't always the caption text.
What this experiment shows is that regardless of the image format (plain, no-link, thumb or frame) it is possible to have complete control over the alt text HTML attribute.
However, based on Comments made by Eubulides, it appears that if the HTML alt attribute is blank and the image is a link then the screen reader will read out the filename. Since all thumbnail images are links, and thumbnail images are the most common form of image used on WP, this makes it impossible to have empty alt text read out for many images.
TODO: Confirm that link title attributes are not read out by screen readers. Confirm that the image filename is read out for link images with empty alt attributes.
DONE: FANGS confirms that the link title attributes are ignored and confirms that the image filename (e.g. "slash Green underline check.png", not the "File colon Green check.png" in the markup) is read out when the HTML alt attribute is blank (or a ) but the image is wrapped in a link. Damn.
Plain
editPlain, no link to image page
editNumber | Image | Wiki | Image Alt | Comment |
---|---|---|---|---|
2.1 | [[File:Blue check.png|link=]] | Blue check.png | The filename is used for the alt text. | |
2.2 | [[File:Blue check.png|link=|Alt text]] | Alt text | The unnamed parameter is used for the alt text. | |
2.3 | [[File:Blue check.png|link=|alt=Alt text|Not used text]] | Alt text | The unnamed parameter is not used. | |
2.4 | [[File:Blue check.png|link=|alt=Alt text]] | Alt text | ||
2.5 | [[File:Blue check.png|link=|alt=|Not used text]] | The unnamed parameter is not used. This image is completely ignored by a screen reader. | ||
2.6 | [[File:Blue check.png|link=|alt=]] | This image is completely ignored by a screen reader. |
Thumb
editNumber | Image | Wiki | Alt | Caption | Comment |
---|---|---|---|---|---|
3.1 | [[File:Green check.png|thumb]] | Green check.png | The filename is used for the alt text. | ||
3.2 | [[File:Green check.png|thumb|Caption text]] | Caption text | The unnamed parameter is used for the caption. | ||
3.3 | [[File:Green check.png|thumb|alt=Alt text|Caption text]] | Alt text | Caption text | The unnamed parameter is used for the caption. | |
3.4 | [[File:Green check.png|thumb|alt=Alt text]] | Alt text | |||
3.5 | [[File:Green check.png|thumb|alt=|Caption text]] | Caption text | The unnamed parameter is used for the caption. | ||
3.6 | [[File:Green check.png|thumb|alt=]] | ||||
3.7 | [[File:Green check.png|thumb|alt= ]] | (space) | |||
3.8 | [[File:Green check.png|thumb|alt=-]] | - |
Frame
editNumber | Image | Wiki | Alt | Caption | Comment |
---|---|---|---|---|---|
4.1 | [[File:Orange check.png|frame]] | Green check.png | The filename is used for the alt text. | ||
4.2 | [[File:Orange check.png|frame|Caption text]] | Caption text | The unnamed parameter is used for the caption. | ||
4.3 | [[File:Orange check.png|frame|alt=Alt text]] | Alt text | Caption text | The unnamed parameter is used for the caption. | |
4.4 | [[File:Orange check.png|frame|alt=Alt text]] | Alt text | |||
4.5 | [[File:Orange check.png|frame|alt=|Caption text]] | Caption text | The unnamed parameter is used for the caption. | ||
4.6 | [[File:Orange check.png|frame|alt=]] |