question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Elements with epub:type in <aside epub:type="footnote"> are not supported

See original GitHub issue

Hi,

the following HTML snippet throws an error in Thorium-1.3.0-alpha.1.2291:

grafik
<p id="abs_5-379" class="firstInSequence">Text vor Endnote <span id="fn_elNr-1-2-1-2-1-2-2" class="endnote"><a epub:type="noteref" role="doc-noteref" href="#fn_elNr-1-2-1-2-1-2-2_target">1</a></span> Text nach Endnote</p>
<aside class="endnote" id="fn_elNr-1-2-1-2-1-2-2_target" epub:type="footnote" role="doc-footnote" aria-label="Footnote 1">
  <div class="footnote_counter">
    <p><a href="#fn_elNr-1-2-1-2-1-2-2" epub:type="referrer" role="doc-backlink">1</a></p>
  </div>
  <div class="footnote_content">
    <p id="fn-abs_7-381">Text in Footnote</p>
  </div>
</aside>

Adding the xmlns:epub namespace on the a element does not help.

If I remove the epub:type="referrer" it works:

grafik

It seems that every epub:typeattribute is not supported in the footnote/endnote popup. Any chance to get this fixed?

/cc @duenckel

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danielweckcommented, Apr 29, 2020

Hello, I copy-pasted your HTML snippet into a test EPUB, and I am seeing this error in the console:

Error: Failed to execute 'insertAdjacentHTML' on 'Element': The provided markup is invalid XML, and therefore cannot be inserted into an XML document.

Error: Failed to set the 'innerHTML' property on 'Element': The provided markup is invalid XML, and therefore cannot be inserted into an XML document.

…I’m investigating.

0reactions
danielweckcommented, Apr 30, 2020

Thanks for letting us know. Note that r2-testapp-js is a maintained lightweight Electron app (reader window, no library / bookshelf view) used to test-drive the internal Readium2 components, so it includes this bugfix. https://github.com/readium/r2-testapp-js/releases

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pop-up Footnotes
In EPUB 3 Flowing and Fixed Layout books, you can create pop-up footnotes by labeling footnotes with the appropriate epub:type values. You use...
Read more >
The epub:type Attribute - Accessible Publishing Knowledge ...
Identify footnotes and endnotes using the epub:type attribute. ... Marking an aside element as a footnote is appropriate, for example, but marking a...
Read more >
EPUB 3 Structural Semantics Vocabulary 1.1 - W3C
This vocabulary, a part of EPUB® 3, defines a set of properties relating to the description of structural semantics of written works.
Read more >
EpubCheck in Calibre gives errors with epub:type and aside
I get these two errors: ERROR(RSC-005): Error while parsing file 'attribute "epub:type" not allowed here;. ERROR(RSC-005): Error ...
Read more >
Implementation of the epub:type="noteref" #1667 - GitHub
I just learned about this valuable method of using a popup window for footnotes, and that it co-exists with the usual end-of-section footnotes....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found