# MED_018: bad SVG fragment in overlay, how to fix it

Source: https://epubcc.com/epubcheck/med_018/ (updated 2026-11-04)

EPUBCheck MED_018 is a warning message: “URL fragment should be an SVG fragment identifier, but found '#…'.” A media overlay text reference into an SVG document uses a fragment that is not an SVG fragment identifier. EPUB recommends SVG fragment identifiers there, because reading apps may not support other schemes; EPUBCheck warns and shows the fragment.

- Official message (EPUBCheck 5.4.0): URL fragment should be an SVG fragment identifier, but found '#%1$s'.
- Default severity: Warning

## Typical causes

- Fragments written for XHTML used on an SVG page, such as in fixed-layout comics with narration.
- A typo in the fragment.

## How to fix it

1. Point the text src to an element id in the SVG, or use an SVG fragment identifier such as a view or viewBox fragment.
2. Check that the id really exists in the SVG file.
3. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

For XHTML chapters the equivalent warning is MED_017.

## Sources

- EPUB 3.3, §9.3.2.2 Referencing document fragments: https://www.w3.org/TR/epub-33/#sec-media-overlays-fragids (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
