Skip to content

Validate text fragment locators (#:~:text=) in media overlay text src #1659

@richwaters

Description

@richwaters

As discussed in this issue from the EPUB spec: w3c/epub-specs#2934, text fragments are both valid and useful as values for the src attribute in media overlays. Given that, epubcheck should validate these when they are encountered in place of a fragment identifier.

Currently (as discussed at #1248) epubcheck warns with MED_017 - "URL fragment should indicate an element ID" for these locators. This issue proposes that #:~:text= locators be validated explicitly rather than treated like other non-ID fragments. Specifically, the locator should be validated to ensure that it is well-formed and resolves to a single location in the target document.

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions