Skip to content

Landmark for table of contents #311

@michael-roe

Description

@michael-roe

EPUB3.3, section 7.4.4, recommends having landmarks for the body matter and the table of contents:

https://www.w3.org/TR/epub-33/#sec-nav-landmarks

I believe that Apple Books will use the bodymatter landmark by starting reading at that point, though I haven’t tested it.

In general, e-reader support for landmarks is poor.

What I think should happen is if the input HTML contains a table of contents marked by role=“doc-toc”, then the output epub should have a landmarks navigation section with an epub:type=“toc” link pointing at it.

The expected behaviour here is that the ebook contains two tables of contents, one of which is autogenerated by ebookmaker and the other of which is nicely formatted and part of the input HTML. E-readers that know about landmarks can have a UI button you click to take you to the second one.

Bodymatter is harder, because it’s not obvious to me how we identify where the body matter starts in the input HTML.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions