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.

Difference between revisions of "Aria-Edit: F65: Failure of Success Criterion 1.1.1 due to omitting the alt attribute or text alternative on img elements, area elements, and input elements of type image"

From WCAG WG
Jump to: navigation, search
m (Description)
Line 1: Line 1:
 +
==Status==
 +
* Reviewed by WG on 11 July 2013, see [http://www.w3.org/2013/07/11-html-techs-tf-minutes.html#item02 feedback]
 +
 
==Applicability==
 
==Applicability==
  

Revision as of 20:51, 25 July 2013

Status

  • Reviewed by WG on 11 July 2013, see feedback

Applicability

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)

Description

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.

Examples

Example 1: Missing alt text

In the code example below, the person using a screen reader would not know the purpose of the image.

Example Code:

<img src="../images/animal.jpg" />

Resources

No resources available for this technique.

Related Techniques

H67: Using null alt text and no title attribute on img elements for images that AT should ignore

Tests

Procedure

Identify img, area and input elements of type "image". For each of these elements:

  1. check if the alt attribute is present AND provides a sufficiently descriptive text alternative
  2. check if the title attribute is present AND provides a sufficiently descriptive text alternative
  3. check if the aria-label attribute is present AND provides a sufficiently descriptive text alternative

Expected Results

If check #1 AND check #2 AND check #3 are false, this failure condition applies and content fails the Success Criterion.