nlbdev / nordic-epub3-dtbook-migrator

Tools for converting between a strict subset of DTBook and EPUB3.
http://nlbdev.github.io/nordic-epub3-dtbook-migrator/
GNU Lesser General Public License v2.1
8 stars 7 forks source link

Heading level check incorrect outside of bodymatter when there are parts #547

Closed keyvantextalk closed 1 year ago

keyvantextalk commented 1 year ago

There's an issue where EPUB nav.xhtml files which refer to pages outside of the bodymatter are marked as having an incorrect level. This only occurs in publications with parts and where the page has no explicit heading (ie. we rely on the aria-label)

[nordic_nav_references_2b] The nesting of headlines in the content does not match the nesting of headlines in the navigation document. The toc item (<a href="nordic_epub_2020_1_-053-backmatter.xhtml#d5e9879">) in the navigation document is not nested at the correct level. The referenced document (nordic_epub_20201-053-backmatter.xhtml) occurs in the navigation document at nesting depth 1 (it is not contained inside other sections such as a part or a chapter). The referenced headline (nordic_epub_20201-053-backmatter.xhtml#d5e9879) occurs in the navigation document at nesting depth 1 (it is not contained inside other sections such as a part or a chapter). The referenced headline (`<>[aria label content]</>) occurs in the content document nordic_epub_20201-053-backmatter.xhtml as a `` which implies that it should be referenced at nesting depth 2 in the navigation document.