Accessibility for content providers - images
This is probably the one area that most people involved in websites know about. You have to have an alt tag on an image (actually if you’re in point-scoring mode then it’s an alt attribute in an image tag).
In the Web Content Accessibility Guidelines (WCAG) this is covered under checkpoint 1.1:
Provide a text equivalent for every non-text element (e.g., via “alt”, “longdesc”, or in element content). This includes: images, graphical representations of text (including symbols), image map regions, animations (e.g., animated GIFs), applets and programmatic objects, ascii art, frames, scripts, images used as list bullets, spacers, graphical buttons, sounds (played with or without user interaction), stand-alone audio files, audio tracks of video, and video.
As you can see this is not just about images but other multimedia content that you might include on the website. It’s a priority level 1 requirement, so you need to do this to get any level of accessibility compliance.
The considered view of the accessibility gurus on alt text is:
- it should convey the meaning of the image and be relevant to the content, so “Photo” isn’t going to be of help to anyone and neither is something like “Couple staring” when a stock photo is just being used to set the mood for the content (this is a real example and you couldn’t even see what the couple were staring at!), “Photo of the Houses of Parliament” would be OK
- if the image conveys no content then the alt text should be blank (i.e. when you view the source for the page, in the image tag you should see alt=”")
- if you’ve got an image and text all wrapped up as the same link then the alt text should be blank (otherwise the text is repeated and would sound odd)
Just about every rich text editor will allow you the opportunity to enter the alt text when you add an image to your content, although they might use varying descriptions as to what it is (with this blogging application it’s the ‘Image description’). Since it should be blank in certain cases then it’s not possible to make it required. You should check though what happens if that field is left empty - it should still produce an empty alt attribute (i.e. alt=”") rather than miss it out.
There’s also an extra part to the requirement that most people don’t realise - the longdesc - and that’s usually because the need for it is less common as it relates to complex content (e.g. a chart). So the idea is that you may have a graph - maybe the results of a survey that you undertook - and you need to explain to someone who can’t see it what information you’re trying to convey.
The longdesc attribute itself is a web address where you have (not surprisingly) the long description for the image - this can be on another page or a section of the current page. Not many text editors will have this option by default, so I’m afraid it’s back to editing the HTML source to add the attribute to the image.
Another requirement to consider with images is 2.2:
Ensure that foreground and background colour combinations provide sufficient contrast when viewed by someone having colour deficits or when viewed on a black and white screen. [Priority 2 for images, Priority 3 for text].
So as a priority 2 checkpoint it’s part of the Double-A compliance.
One quick way to check colour combinations is to convert the image into black and white (greyscale is probably the better term). That will give you a good idea as to whether the colour contrast is sufficient. For information about colour-blindness I’d suggest that you look at Vischeck.
Summary
- Always include an alt attribute for an image
- The alt text should convey the meaning of the image
- It is appropriate to leave the alt text empty (i.e. have alt=”") if the image has no real meaning
- For a complex image (such as a graph) you will also need to create a separate page (or section of a page) that explains the information in the image more fully
- Check the contrast and colour combinations of images - or if someone else is providing the images make sure that they are aware of the accessibility requirements