Resources

The mother lode

A super comprehensive list of SVG articles. These were the most helpful to me:

Books

  • Practical SVG from A Book Apart. Written by Chris Coyier (CSS Tricks).

SVG basics

SVG deep dive

Fallbacks

Fragment identifiers

Icon systems and sprites

Implementations

Styling and animating via CSS

Accessibility

Summary

  1. Use inline SVG so assistive tech (AT) can access it.
  2. Provide a <title> (equivalent to <img alt="">).
  3. Use <svg aria-labelledby="xyz"> for broader support (requires <title id="xyz">).
  4. Use <svg role="img"> for content images.

Exceptions for icons

  1. Use <svg aria-hidden="true" role="presentation"> if adjacent text is readable by AT.
  2. Use <title> if no accompanying text is present (also aria-labelledby).

Optimization and performance

Tools

Optimize

  • svgOMG — Drag/drop an SVG onto the browser to optimize it.

Polyfills

Gulp build

Browser support