Most broken SVG links are hit areas, styles, or the wrong kind of <a>.
hit area
Unpainted shapes are hard to click
fill="none" with no stroke may ignore clicks. Give the link a painted region or adjust pointer-events.
css
Selector a matches HTML too
A bare a { } rule can style HTML links. Scope with svg a or an SVG @namespace when mixing both.
a11y
Name icon-only links
Shape-only links need aria-label (or visible text) so assistive tech can announce the destination.
action
Links navigate; scripts toggle
If the control does not go to a URL, use interactivity patterns instead of a fake href="#".
Compatibility
Browser Support
The SVG <a> element with modern href is supported in every modern browser.
✓ Baseline · Widely available
SVG <a>
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera support SVG links with href. Prefer href over xlink:href for new content.
97%Global support (approx.)
Google ChromeAll modern
Full support
Mozilla FirefoxAll modern
Full support
Apple SafariAll modern
Full support
Microsoft EdgeAll modern
Full support
OperaAll modern
Full support
Samsung InternetAll modern
Full support
Internet Explorer9+
Partial (xlink era)
SVG <a href>Widely supported
Bottom line: Safe for production icon navigation in modern browsers. Always style hover/focus and name graphic-only links.
Remember
Key Takeaways
Wrap shapes or text in SVG <a>.
Use href (not legacy xlink:href).
Style hover/focus yourself — no UA underline.
_blank: add rel="noopener noreferrer".
One line: SVG <a href> around a painted graphic.
UA style
Default CSS Settings
SVG links start visually plain. A small starter set:
defaults.css
/* Scope to SVG anchors when the page also has HTML links */
svg a {
cursor: pointer;
}
svg a:focus-visible {
outline: 2px solid #2563eb;
outline-offset: 2px;
}
/* Text links: SVG uses fill, not color alone */
svg a text {
fill: #2563eb;
text-decoration: underline;
}
Prefer svg a (or an SVG @namespace) so HTML anchors are not restyled by accident.
Frequently Asked Questions
Wrap the shape in an SVG <a> and set href. Example: <a href="/page"><circle ... /></a>.
Prefer modern href. xlink:href is legacy. New content should not rely on xlink:href alone.
Use target="_blank" and rel="noopener noreferrer" so the new page cannot access window.opener.
Check overlays, pointer-events, and whether the shape has a painted hit area (fill or stroke).
SVG links have no default underline. Style the child shape, for example a:hover circle { fill: ... }.
Use SVG <a> for real navigation. Use scripts and roles for toggles and app actions — see SVG Interactivity.