Skip to content

Authoring Media Overlay with text fragments instead of an ID #2934

@HadrienGardeur

Description

@HadrienGardeur

Section

https://w3c.github.io/epub-specs/epub34/authoring/#sec-media-overlays

Describe the problem

This was originally raised by @richwaters in #2917 (comment)

Authoring Media Overlays using SMIL can put a heavy toll on the HTML that you need to produce.

With an increased number of tools to do automated alignment or to generate audio (with TTS), this is quickly becoming the heaviest task for any of these tools. It can be very invasive and heavily impact the markup for HTML.
Unlike other features of our spec, this is often done as a separate task after the EPUB has been authored.

Our spec is fairly open when it comes to fragments. In the definition of the text element, we define src as:

Refers to the associated EPUB content document and, optionally, identifies a specific part of it.

The value MUST be a path-relative-scheme-less-URL string, optionally followed by U+0023 (#) and a URL-fragment string.

We also say in a note that:

This specification places no restriction on the src attribute of a text element […]

In practice though, things are a little different:

  • in all of our examples we use fragment IDs
  • and the entire ecosystem expects them as well

Describe the fix or new feature you propose

First of all, I think that we could be a little more explicit and openly say that we recommend using a fragment ID. This is documented further down in the spec (https://w3c.github.io/epub-specs/epub34/authoring/#sec-media-overlays-fragids) but can be easily missed if you focus on the definitions.

But with the addition of text fragments for annotations, we could also consider them as well.

Unlike IDs, text fragments would allow production tools to create SMIL files without changing the HTML at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    In review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions