|The source filename of the image element must not be part of its text alternative.
- A text alternative should summarize the purpose of an image for people with visual impairments.
- The source filename of the image should not be included because generally it is not useful information.
- An image with a text alternative that is an empty string is ignored by assistive technologies, and indicates that it is being used for styling purposes rather than meaningful content.
HTML4 Legacy Techniques
HTML5 and ARIA Techniques
|WCAG Success Criteria
1.1.1 Non-text Content (Level A, Primary Success Criterion)
- A text alternative should describe the purpose of an image as succinctly as possible (preferably with no more than 100 characters). Do not include the source filename as part of the text content.
alt attribute is the preferred and most commonly used way to provide a text alternative for
aria-labelledby attribute can be used to provide a text alternative when images can be described using text already associated with the image, such as a visible caption, or for elements with
aria-label attribute should only be used to provide a text alternative in the special case when an element has a
title attribute will be used by assistive technologies to provide a text alternative if no other specification technique is found.