Rule: Alt text must not include filename

Rule ID Image 3
Conformance Required
Definition The source filename of the image element must not be part of its text alternative.
Purpose
  • 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.
Conformance Required
WCAG Success Criteria

Success Criterion 1.1.1 Non-text Content

Rule Category Images
Rule Scope Element
Techniques
  • 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.
  • The alt attribute is the preferred and most commonly used way to provide a text alternative for img and area elements.
  • The 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 role="img".
  • The aria-label attribute should only be used to provide a text alternative in the special case when an element has a role="img" attribute.
  • The title attribute will be used by assistive technologies to provide a text alternative if no other specification technique is found.
Information Links