WCAG Techniques for image text alternatives

For many years the main way to provide a text alternative for an image was to use the alt attribute. This has changed with the advent of WAI-ARIA. alt is still a valid, well supported attribute and is often one of the first things that developers learn to use when they create accessible web content.

ARIA provides additional ways to describe what an image is. When there is related text on a page, the aria-labelledby attribute can be used to join in-page descriptions and images, and the aria-label attribute can provide a textual value for assistive technologies to read.

The alt attribute has some advantages: alt is used not only by screen reader users but also search engines for indexing purposes; alt is very well supported by browsers and assistive technologies; and alt is shorter to type than aria-labelledby. But even with these advantages, authors have expressed an interest in using ARIA.

The Web Content Accessibility Guidelines (WCAG) Working Group is working on an update to two non-normative documents, Techniques for WCAG 2.0 and Understanding WCAG 2.0, and discussed extensively whether ARIA is sufficiently ready to suggest that authors use it now, as a part of their workflow.

In order to ensure our non-normative supporting documents are progressive and up to date with new accessible design patterns – the WCAG Working Group requested public comment on two techniques, ARIA 10 and F65.

The technique ARIA10, which originally recommended use of the aria-labelledby attribute for any type of non-text objects, in order to meet WCAG success criteria 1.1.1, was modified during the commenting period to only apply to non-text objects – that do not already allow the use of the alt attribute. This restriction in the use of alt may be due to some limitation in the authoring environment for example.

Also F65, a failure technique, previously stated that any image (<img>, <area>, and <input> of type “image”) that is missing the alt attribute would fail success criteria 1.1.1. The Working Group therefore modified F65 so that images that do not have an alt attribute but do use aria-labelledby or aria-label will not automatically fail the success criteria, provided that the author finds that there is sufficient accessibility support for the ARIA attribute used.

The result of these two changes is that the Working Group is recognising that authors need and want to use ARIA attributes. Given the evolving level of accessibility support the group then decided to:

Allow the responsible use of ARIA attributes for images when accessibility supported (by no longer failing images using aria attributes even if they do not use alt also).

Stop short of fully recommending only the use of ARIA attributes on images (by not including a sufficient technique that would encourage this practice).

As the level of accessibility support for ARIA continues to improve, the Working Group expects to develop additional techniques. It is expected that as accessibility support for aria-label and aria-labelledby improves that a sufficient technique for using ARIA attributes image accessibility will be published.

Thanks for the comment. @alt is still the preferred, tried and tested way of providing simple text alternatives. However, ARIA is very useful in several situations (some outlined above) and enables authors to label and describe web content. So the semantic toolkit is expanding and user agent support is constantly improving. Developers therefore have more options in making content accessible (which is welcome).

Comments are closed.

The W3C blog is for discussions within W3C and the Web community at large. Announcements, issues on Web standards and educational materials among other topics are posted here; see the W3C home page for official announcements from W3C.