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

Include aria-label-type section names in cross-nav-contentdoc check #463

Closed martinpub closed 3 years ago

martinpub commented 3 years ago

Currently, rule [nordic_nav_references_1] checks the integrity of heading content so that toc entries in the navigation document should match the heading of the referred section in the content document.

The same integrity check should be done when a section does not have a h[x] heading tied to it, but only an aria-label attribute.

To take an example, the check should be performed to avoid mismatches such as:

Navigation toc entry: <li><a href="T-000011-001-cover.xhtml#prodnote_1">Framsida</a></li> Content document: <section aria-label="Front cover" class="frontcover" id="prodnote_1">

They should match the same way as ordinary headings should, so the rule should be updated to include aria-label matching in the absence of a h[x] check.

Ping @kalaspuffar.

martinpub commented 3 years ago

(Tested and verified.)