User:Colin/Alt

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 &amp;nbsp;) but the image is wrapped in a link. Damn.