svg-image-text-alternative-present
SVG <image> must have a text alternative
automaticWCAG 1.1.1 (A)confidence: mediumseverity: seriousperceivable
Checks that SVG <image> elements provide a text alternative via <title>/<desc> or an ARIA accessible name.
Applies to. Applies to SVG <image> elements that are exposed to assistive technologies. Elements otherwise hidden from the accessibility tree remain applicable if they are tabbable or referenced by IDREF relationships (per engine eligibility checks). SVG <image> elements with role="presentation" or role="none" are excluded only when they are not focusable.
Expectation. Each applicable SVG <image> element has a text alternative via:
- a non-empty direct <title> child, OR
- a non-empty direct <desc> child, OR
- an accessible name (aria-label / aria-labelledby / title attribute).
Examples
pass
<svg width="40" height="24"><image href="logo.png"><title>Logo</title></image></svg>
A `<title>` inside the SVG `<image>` provides the alternative.
fail
<svg width="40" height="24" aria-label="container"><image href="logo.png"></image></svg>
The `<image>` itself has no `<title>`/`<desc>`/ARIA name (the outer `<svg>`'s label doesn't transfer to it).