Vectroy

Vector Design Accessibility: Alt Text, Color Contrast, and WCAG

Accessible vector designs require alt text, sufficient color contrast, and semantic structure. This covers guidelines, testing, and why accessibility matters for business and ethics.

December 21, 2026 · 9 min read

Accessible vector design comes down to three testable properties: a screen reader can name the graphic, meaningful colors and strokes meet WCAG 2.2 AA contrast ratios, and color is never the only channel carrying information. An inline SVG with no role and no title is worse than a missing alt attribute — assistive technology may announce nothing, or worse, walk the raw element tree. The good news is that SVG accessibility is fully specified: role="img" plus <title>/<desc> handles semantics, two contrast numbers (4.5:1 and 3:1) cover almost every visual case, and one eight-color palette sidesteps the most common color-vision deficiencies. Each piece takes minutes once you know the exact markup.

How Do You Make an SVG Accessible to Screen Readers?

The standard pattern for an informative inline SVG uses role="img" to collapse the graphic into a single image node, a <title> as its accessible name, and <desc> for longer description, wired together with aria-labelledby:

  • <svg role="img" aria-labelledby="chart-title chart-desc" viewBox="0 0 640 400">
  •   <title id="chart-title">Monthly revenue, January to June 2026</title>
  •   <desc id="chart-desc">Line chart showing revenue rising from $12,000 in January to $31,000 in June.</desc>
  •   <path d="..." />
  • </svg>

Three details decide whether it actually announces. The <title> must be the first child element of the SVG — placed after other shapes, it is ignored by several screen reader/browser combinations. The id references in aria-labelledby must be unique per document (inlined components repeat ids; suffix them). And for an SVG delivered via <img src="chart.svg">, none of this applies — the alt attribute on the <img> tag is the accessible name, and it wins over anything inside the file.

Graphic RoleMarkup PatternScreen Reader Result
Informative (chart, diagram, illustration)role="img" + <title>/<desc> + aria-labelledbyAnnounces the title; description available on demand
Decorative (flourish, background shape)aria-hidden="true" focusable="false", or empty alt="" on the img tagSkipped entirely
Functional icon inside a link or buttonaria-hidden="true" on the SVG + accessible name on the <a>/<button> (text or aria-label)Announces the action, e.g. "Search, link"
Complex data visualizationrole="img" + summary title + adjacent data table or long description linkSummary first, full data reachable as text

The focusable="false" attribute on decorative SVGs exists for legacy Internet Explorer and old Edge, which otherwise put inline SVGs in the tab order. It costs nothing and prevents phantom tab stops. When in doubt about whether a graphic is decorative or informative, apply the deletion test: if removing it would remove information, it needs a name.

What Are the Alt Text Patterns for Vector Graphics?

Write alt text — the SVG's <title>, or the alt attribute when the SVG is an <img> — as one sentence stating what the graphic conveys, not what it draws. "Line chart: monthly revenue rose from $12,000 in January to $31,000 in June" beats "blue line going up on a grid." Screen readers already announce that it is an image; never open with "Image of..." or "Graphic of...", which wastes the first four words every listener hears.

The pattern library by graphic type:

  • Logo: the organization name, and only add the word "logo" where context makes it ambiguous — Vectroy in a header, Vectroy logo in a footer alongside other marks.
  • Functional icon: the action or state, never the shape — "Search", "Cart, 3 items", not "magnifying glass".
  • Decorative shape: no text at all; hide it with aria-hidden="true" or alt="". Writing "decorative swirl" is noise.
  • Chart or diagram: the takeaway in the title ("Q2 signups grew 40%, driven by referral traffic"), with the underlying numbers in an adjacent table for anything more complex than three data points.
  • Illustration carrying narrative: one sentence of scene plus one of purpose, kept under ~125 characters in the title with elaboration in <desc>.

Length discipline matters more than most guides admit: at an average 180 words per minute, a 125-character title costs a screen reader user four seconds, and titles longer than that get truncated by some tools anyway. Put the payload first — the noun or the finding — and cut adjectives until only information remains.

What Contrast Ratios Does WCAG 2.2 AA Require for Vector Art?

WCAG 2.2 AA sets three numbers you will use constantly. Normal text: 4.5:1 against its background. Large text — 24 px (18 pt) regular weight or 19 px (14 pt) bold and up: 3:1. Meaningful graphics and interface components (chart strokes, icon outlines, focus indicators, form field borders): 3:1 under Success Criterion 1.4.11, Non-text Contrast. Logotypes are explicitly exempt from the text rule — a brand name in a logo may use any contrast — but the exemption covers the name, not chart lines or icons around it.

Practical anchors for vector work: #767676 on white is 4.54:1 — the lightest gray that passes AA for body text, and a useful floor when building tint ramps. A chart series drawn in #94d2ff-class pastels on white typically measures under 2:1 and fails 1.4.11 even though it looks fine on a projector; series strokes need the same 3:1 that text-adjacent UI gets. For line weight, contrast and thickness compound: a 1 px hairline at 3.2:1 is technically compliant and practically invisible — 2 px minimum for chart strokes, 3 px for icon outlines at small sizes.

New in WCAG 2.2: Target Size and Focus Visibility

Two WCAG 2.2 additions bite vector-based interfaces specifically. Success Criterion 2.5.8 (Target Size, Minimum, Level AA) requires interactive targets of at least 24x24 CSS pixels — an icon drawn at 16 px is fine visually, but its clickable area must reach 24 px with padding. And 2.4.11 (Focus Not Obscured) means a focus ring on an SVG-based button cannot be covered by sticky headers or overlays. Both are geometry problems, which makes them the designer's job, not the developer's.

Which Color Palettes Are Safe for Color-Blind Users?

Roughly 1 in 12 men (8%) and 1 in 200 women (0.5%) have a color vision deficiency, and red-green confusion — deuteranomaly and protanomaly — accounts for the overwhelming majority, with blue-yellow (tritan) and total achromatopsia making up the remainder. A palette is safe when adjacent series differ in lightness, not just hue; when red-vs-green is never the only distinction; and when every color encoding has a second channel — shape, dash pattern, direct labeling, or position.

The Okabe-Ito palette is the standard eight-color starting point, designed to remain distinguishable across the common deficiency types:

ColorHexColorHex
Orange#E69F00Blue#0072B2
Sky blue#56B4E9Vermillion#D55E00
Bluish green#009E73Reddish purple#CC79A7
Yellow#F0E442Black#000000

The grayscale test is the fastest check that needs no tooling at all: convert the artwork to luminance-only (in Figma, a black overlay at 100% saturation-blend, or any CVD simulator) and ask whether every series, state, and callout is still distinguishable. If yes, the design does not depend on hue and no deficiency can break it. Dash patterns (stroke-dasharray: 6 3 vs solid) and direct end-of-line labels beat legends for line charts, because they remove the color-lookup step entirely.

Which Tools Test SVG Accessibility?

Test in three passes — design-time, code-time, and human — because each catches what the others miss. At design time in Figma or Sketch, Stark checks contrast ratios and simulates eight deficiency types on the canvas before export; Who Can Use (web) shows how any hex pair renders across all types. Both are free at entry level.

Code-Time Scanners and the Human Pass

  • axe DevTools (Deque, browser extension): flags missing roles/titles, contrast failures, and ARIA misuse; the same engine runs in CI via @axe-core/cli.
  • WAVE (WebAIM, free): visual overlay of alt/title/contrast issues on the live page — fastest first pass.
  • Lighthouse (built into Chrome DevTools): accessibility score in the same audit as performance; wire it into GitHub Actions with Lighthouse CI to fail builds on regressions.
  • Colour Contrast Analyser (TPGi, free desktop app): a system-wide color picker giving the exact ratio of any two pixels, including inside canvas apps that DOM tools cannot read.
  • Chrome DevTools Rendering panel: emulates protanopia, deuteranopia, and reduced motion without installing anything.
  • NVDA (Windows, free) and VoiceOver (macOS/iOS, built in — press Cmd+F5): actual screen readers; automated tools catch roughly 30-40% of real accessibility problems, so the human pass is not optional for anything public.

The order matters as much as the tools: Stark or Who Can Use while colors are still editable, axe/Lighthouse in the build pipeline, VoiceOver or NVDA on the release candidate. An SVG that passes all three — announced correctly, 4.5:1 text, 3:1 graphics, grayscale-safe encoding — is measurably accessible rather than aspirationally accessible, and every one of those properties survives conversion: run the final master through an SVG to PNG converter for raster contexts that cannot carry roles or titles at all, and keep the semantic SVG for the web. Animated graphics add one more duty: the reduced-motion handling covered in the SVG animation guide.

Frequently asked questions

Does every SVG need a title element?

No — only informative ones. Decorative SVGs should be hidden instead: aria-hidden="true" plus focusable="false" for inline graphics, or alt="" for img tags. Informative SVGs need role="img" and a title as the first child element, referenced by aria-labelledby; placed after the shapes, the title is ignored by several screen readers. Functional icons inside buttons or links get aria-hidden="true" while the button carries the accessible name.

What contrast ratio do icons and chart graphics need?

3:1 against adjacent colors, per WCAG Success Criterion 1.4.11 (Non-text Contrast), which covers meaningful graphics, icon strokes, chart lines, and interface component boundaries at AA level. Text inside vector art follows the text rules: 4.5:1 normal, 3:1 for large text (24 px regular or 19 px bold). Logotype brand names are exempt from the text ratio, but the exemption does not extend to icons or data strokes around them.

Should I use alt text or an SVG title element?

It depends on delivery. An inline SVG (markup pasted into the HTML) uses a title element with role="img" and aria-labelledby — the alt attribute does not exist on inline SVG. An SVG loaded through an img tag uses the img's alt attribute, which overrides anything inside the file. A CSS background-image gets its meaning from surrounding text instead, since neither mechanism applies. Same words, three different attachment points.

Is red-green color blindness the only palette concern?

No, but it dominates: deuteranomaly and protanomaly account for the vast majority of the roughly 8% of men and 0.5% of women with color vision deficiency, while tritan (blue-yellow) and achromatopsia are rare. The robust fix covers all types at once — vary lightness between adjacent colors, never encode meaning in hue alone, and add a second channel such as dash patterns, shapes, or direct labels. The grayscale test verifies it in ten seconds.

How do I test my SVG with a real screen reader?

Use VoiceOver or NVDA — both are free. On macOS, press Cmd+F5 to start VoiceOver, then navigate with the rotor to images and confirm your SVG announces its title, not "graphic" or raw element names. On Windows, install NVDA and use Insert+arrow navigation. Listen to three things: the announced name, whether decorative graphics are skipped silently, and whether icon buttons state their action. Automated scanners catch only part of these issues.

Sources

Convert files for this workflow

Try it on your own file

Drop in an image or an SVG and see the result before you pay. No signup is required to preview.