We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

svg-img-alt

Web validation

SVG elements with an img, graphics-document, or graphics-symbol role must have an accessible name.

An SVG with an img, graphics-document, or graphics-symbol role represents meaningful visual information. Without an accessible name provided by aria-label, aria-labelledby, or a <title> element, assistive technologies cannot convey that meaning to people who cannot see the graphic. Adding a short, accurate text alternative ensures the graphic’s purpose is available to screen reader users.

Pass Patterns

Accessible name via aria-label

The aria-label gives the SVG a programmatically discernible text alternative that screen readers announce.

HTML
<svg viewBox="0 0 65 65" aria-label="Circles" role="img">
    <ellipse rx="30" ry="30" transform="translate(32.5 32.5)" fill="none" stroke="#000" stroke-width="4"/>
    <ellipse rx="20" ry="20" transform="translate(32.5 32.5)" stroke-width="0"/>
</svg>

Accessible name via <title> + aria-labelledby

The <title> element is referenced by aria-labelledby, so assistive technologies expose “Circles” as the element’s name.

HTML
<svg viewBox="0 0 65 65" aria-labelledby="svg-logo-title" role="graphics-symbol">
    <title id="svg-logo-title">Circles</title>
    <ellipse rx="30" ry="30" transform="translate(32.5 32.5)" fill="none" stroke="#000" stroke-width="4"/>
    <ellipse rx="20" ry="20" transform="translate(32.5 32.5)" stroke-width="0"/>
</svg>

Fail Patterns

No text alternatives

Because the SVG lacks aria-label, aria-labelledby, or a <title>, it has no accessible name.

HTML
<svg viewBox="0 0 65 65" role="graphics-symbol">
    <ellipse rx="30" ry="30" transform="translate(32.5 32.5)" fill="none" stroke="#000" stroke-width="4"/>
    <ellipse rx="20" ry="20" transform="translate(32.5 32.5)" stroke-width="0"/>
</svg>

Empty <title> element

An empty <title> provides no useful information, so assistive technologies still announce nothing.

HTML
<svg viewBox="0 0 65 65" role="img">
    <title></title>
    <ellipse rx="30" ry="30" transform="translate(32.5 32.5)" fill="none" stroke="#000" stroke-width="4"/>
    <ellipse rx="20" ry="20" transform="translate(32.5 32.5)" stroke-width="0"/>
</svg>

WCAG techniques

Sufficient techniques

Failure techniques

ACT Rules

Try It Yourself

Using a screen reader

New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers

  1. Load the page and open a screen reader.
  2. Navigate to the graphic.
  3. Listen to the screen reader announce its name.

Expected result: You hear the text alternative (for example, “Circles”).

Actual result: If nothing is announced or the name is incorrect, the SVG fails.

Inspecting the browser dev-tools

  1. Open the browser’s Accessibility pane.
  2. Select the SVG element.
  3. Verify that the Name property matches the intended alternative text.

Expected result: The Name field shows the descriptive text.

Actual result: A blank or missing name indicates failure.

FAQ

How does this issue relate to 1.1.1 Non-text Content?

SC 1.1.1 requires every non-text element, including SVGs functioning as images, to expose an equivalent text alternative. Without it, users of assistive technologies cannot perceive the content at all.

Why is this issue marked as Serious?

When an SVG lacks alternative text, critical information becomes invisible to people who rely on screen readers or other assistive technologies. Because the barrier prevents basic understanding rather than merely lowering efficiency, the impact is high across browsers and platforms.

What if the image is purely decorative?

Use role="presentation" instead of role="img", role="graphics-document" or role="graphics-symbol" (or use aria-hidden="true") so assistive technology will ignore it.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.21.1.1 Non-text Content (A)All non-text content that is presented to the user has a text alternative that serves the equivalent purpose, except for controls/input, time-based media, tests, sensory experiences, CAPTCHA, and decoration/formatting/invisible content.
EN 301 5499.1.1.1 Non-text ContentSame as the WCAG text.
Section 5081194.22(a)A text equivalent for every non-text element shall be provided (e.g., via “`alt`”, “`longdesc`”, or in-element content).
508 Trusted Tester1.1.1-meaningful-image-name, 7.AThe accessible name and accessible description for a meaningful image provides an equivalent description of the image.
508 Trusted Tester1.1.1-decorative-image, 7.BThere is no accessible name and accessible description for a decorative image.

Personas impacted by this issue

Learn More