# MED_015: overlay out of reading order, how to fix it

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

EPUBCheck MED_015 is a usage message: “Media overlay text references must be in reading order. Text target "…" is before the previous link target in … order.” The text references of a media overlay are not in reading order. A text target comes before the previous one in the document, so narration would jump backwards; EPUBCheck reports it as a usage note with -u.

- Official message (EPUBCheck 5.4.0): Media overlay text references must be in reading order. Text target "%1$s" is before the previous link target in %2$s order.
- Default severity: Usage

## Typical causes

- par elements reordered by hand or by an editing tool.
- Ids in the chapter that were renumbered after the overlay was made.

## How to fix it

1. Open the SMIL file and find the text target EPUBCheck names.
2. Reorder the par elements so their text targets follow the order of the chapter, or fix the ids they point to.
3. If the jump is intended (for example a sidebar read later), you can leave it.
4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

The same check on the table of contents is NAV-011.

## 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)
- EPUBCheck wiki: Running EPUBCheck (command-line options): https://github.com/w3c/epubcheck/wiki/Running (read 2026-11-04)

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