This Wiki page is edited by participants of the WCAG Working Group. It does not necessarily represent consensus and it may have incorrect information or information that is not supported by other Working Group participants, WAI, or W3C. It may also have some very useful information.
Aria-Edit: F65: Failure of Success Criterion 1.1.1 due to omitting the alt attribute on img elements, area elements, and input elements of type image
From WCAG WG
|Line 1:||Line 1:|
Revision as of 20:51, 25 July 2013
- Reviewed by WG on 11 July 2013, see feedback
HTML and XHTML
This failure relates to:
- Success Criterion 1.1.1 (Non-text Content)
- How to Meet 1.1.1 (Non-text Content)
- Understanding Success Criterion 1.1.1 (Non-text Content)
This describes a failure condition for text alternatives on images. If there is no
alt attribute, then assistive technologies are not able to identify the image or to convey its purpose to the user.
Some Assistive Technologies attempt to compensate for the missing
alt text by reading the file name of the image. But it is insufficient to rely simply on the file name for many reasons. For example, file names may not be descriptive (e.g., images/nav01.gif), and technology specifications do not require descriptive file names. And some Assistive Technologies do not read the file name if
alt attribute is absent.
Some Assistive Technologies try to compensate for the missing
alt attribute by using the value of the
title attribute or an
aria-label attribute (where present) as text alternative for the image. But this is not what these attributes are intended for. The
title attribute provides supplementary information while the
aria-label attribute provides a label to form inputs in cases where a visible label cannot be used.
While omitting the
alt attribute on the
img element violates the HTML specification, Assistive Technologies will usually be able to derive an accessible name from the
title attribute or the
aria-label attribute (when present) in cases where the
alt attribute is missing. The failure condition therefore applies only when neither the
alt attribute nor the
title attribute nor the
aria-label attribute are present to provide a descriptive alternative.
Example 1: Missing alt text
In the code example below, the person using a screen reader would not know the purpose of the image.
<img src="../images/animal.jpg" />
No resources available for this technique.
input elements of type "image". For each of these elements:
- check if the
altattribute is present AND provides a sufficiently descriptive text alternative
- check if the
titleattribute is present AND provides a sufficiently descriptive text alternative
- check if the
aria-labelattribute is present AND provides a sufficiently descriptive text alternative
If check #1 AND check #2 AND check #3 are false, this failure condition applies and content fails the Success Criterion.