I am reading and taking notes on the HTML specifications for 100 days as part of #The100DayProject. Read the initial intent/backstory. I am a Microsoft employee but all opinions, comments, etc on this site are my own. I do not speak on behalf of my employer, and thus no comments should be taken as representative of Microsoft's official opinion of the spec. Subsections not listed below were read without comment.
126.96.36.199.9 A purely decorative image that doesn't add any information
I actually looked this up today. For images that are purely decorative, use an empty alt attribute (
alt=“”) on the img element. The spec encourages authors to try to include these images using CSS instead of through the markup, I think there are situations to demand use of the img tag instead.
188.8.131.52.10 Inline images
“When images are used inline as part of the flow of text in a sentence, provide a word or phrase as a text alternative which makes sense in the context of the sentence it is apart of.”
184.108.40.206.11 A group of images that form a single larger picture with no links
I’m just thinking right now that the people who put together this spec are really covering their bases. This whole section is a pretty awesome cheatsheet when you’re unsure of how to proceed w/ a particular
In this case of a group of images that create a whole, you would put descriptive text on ONE of the images, and then set the others to an empty alt attribute (
220.127.116.11.12 Image maps
If the image meets certain criteria such that it can be considered an image map, you HAVE to add meaningful
alt attributes, as it’s interactive content and needs to be accessible. You’d add said
alt attributes to the
img elements itself, and to the
area elements nested inside the
map element associated with the image.
18.104.22.168.13 A group of images that form a single larger picture with links
In this case, each linked
img within the composite whole needs an
22.214.171.124.14 Images of Pictures
They’re referring here to photos, paintings, drawings, artwork, illustrations, etc. that “can convey a significant amount of information visually or provide a specific sensory experience, to a sighted person”.
In these cases, you would write a brief description, a task in which “best judgement” is needed. I still think a good test would be to read the alt text and surrounding text out loud to someone (keeping in mind that a screen reader would typically announce presence of an image before or after the alt text).
126.96.36.199.15 Webcam images
“Webcam images are static images that are automatically updated periodically.” Puppy cam!
The idea with these is that the vantage point of the camera is pretty fixed. The alt text is the title and time stamp (preferred to be in surrounding text, but alas…?), and there would be a caption for the photo via the
figcaption elements. The way this section is written is a little confusing because it’s hard to tell what the spec authors are advising and what they are saying gets returned by your typical webcam program.