This is a draft document supplied by the WCAG Techniques Task Force. It in no way represents a WCAG Working Group consensus or agreement and is provided for informational and discussion purposes only. The accessibility test listed below should not be construed as required for conformance with the proposed WCAG2.

HTML Test Suite for WCAG 2.0
Test 2 - Alt text should not be the same as the filename.

W3C Editor's Draft 2005-08-11

Chris Ridpath, ATRC, University Of Toronto
Jenae Andershonis, Microsoft Inc.


This test case was created by the ATRC at the University Of Toronto. It should not be construed as required for conformance with the proposed WCAG2.

The complete list of tests may be found at http://www.w3.org/WAI/GL/WCAG20/tests/

Comments on this test may be made to the WCAG mailing list.

Status Of This Test

As part of the conformance test process, this test has a status of 'rejected'.

WCAG2 Guideline

This test is not required for conformance to the current WCAG2. It is provided for discussion and informational purposes only.


There are no techniques related to this test.

Prerequisite Tests

The following tests must be run before running this test. If any of the prerequisite tests fail then this test is invalid and should not be run.

Test Process


  1. Check each img element and compare its alt attribute value to its src attribute value.

Expected Results

  1. The alt attribute value and the src attribute values are expected to be different.

Fail Instructions

  1. If both values are the same then view the image and determine if the alt attribute value is appropriate.

Pass Instructions

The following tests are related to this test and may be performed next. There is no requirement that these tests be performed:

  1. Image Alt text is short.
  2. Alt text for all img elements is not placeholder text.
  3. Alt text for all img elements used as source anchors is not empty when there is no other text in the anchor.
  4. Alt text for all img elements contains all text in the image unless the image text is decorative or appears elsewhere in the content.
  5. Alt text for all img elements is the empty string ("") if the image is decorative.

Test Files

These test files contain examples of the accessibility problem detectable by this test. They may also contain more accessibility problems than the one described in this test. Please ignore any extraneous accessibility problems in these files.

Valid XHTML 1.0!