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 a <title> element or an ARIA accessible name (a <desc> element alone does not count).

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 whose role attribute resolves to presentation or none (the first known role token, in any case) 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
  • an accessible name (aria-label / aria-labelledby / title attribute).

The first <title> child counts, wherever it is among the children, as SVG-AAM reads it. A <desc> child does not: SVG-AAM maps it to the accessible description, never the name, as svg-text-alternative-present has it.

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> or ARIA name (the outer <svg>'s label doesn't transfer to it, and a <desc> would describe it, not name it).

View source