Dieser Inhalt ist derzeit nur auf Englisch verfügbar
Audit image-alt
Ensure <img> elements have alternative text or a role of none or presentation
Impact:
Critical
WCAG-Konformität:
A
WCAG 1.1.1
Issue types:
failure, needs review
Image has non-empty accessible name
This rule checks that each image either has a non-empty accessible name or is marked up as decorative.
Content loading...
Autoren: Wilco Fiers
Vorherige Autoren: Anne Thyme Nørregaard, Stein Erik Skotkjerra
Finanzierung: WAI-Tools
Applicability
This rule applies to HTMLimg elements and HTML elements that are a semanticimg, except if the element is programmatically hidden.
Expectation
Each target element has an accessible name that is not empty (""), or has a semantic role of none or presentation.
Background
Assumptions
There are no assumptions.
Accessibility Support
There are several popular browsers that do not treat images with an empty alt attribute (alt="") as having a role of presentation but instead add the img element to the accessibility tree with a semantic role of either img or graphic.
Implementation of Presentational Roles Conflict Resolution varies from one browser or assistive technology to another. Depending on this, some semanticimg elements can fail this rule with some technology but users of other technologies would not experience any accessibility issue.
Images can have their role set to presentation through an empty alt attribute. Presentational Roles Conflict Resolution does not specify what to do if such an image is focusable (it only specifies what to do in case of explicit role="none" or role="presentation"). Some browsers expose these images and some don't. Thus, this rule may fail for technologies that expose these without creating an accessibility issue for users of other technologies.
svg elements have an implicit role of graphics-document in svg-aam. There are popular browsers that do not follow svg-aam and instead expose SVG elements with a different semantic role, such as image, generic or SvgRoot.
This img element has an empty accessible name because the space in the alt attribute is trimmed off by the accessible name computation. Because of the space, the alt attribute is not empty ("") which gives the element the implicit role of img.
This img element has an explicit role of none. However, it is focusable due to the tabindex attribute. Because of this it has a semantic role of img due to Presentational Roles Conflict Resolution. It does not have an accessible name.