Conversation
| if (sourceIDREF === ("#" + targetID)) { | ||
|
|
||
| target.hide(); | ||
|
|
There was a problem hiding this comment.
Question: do we preserve the visibility of footnote content (DOM fragment), so that CFI bookmarks / annotations work as usual? I think yes. To be discussed.
|
The "popup" footnotes will be implement in the next version of shared-js ? Specificly in the app Ios/Android context. |
| $elements.each(function(i) { | ||
|
|
||
| if ($elements[i].localName !== "a" | ||
| && $elements[i].localName !== "aside") { |
There was a problem hiding this comment.
The limitation to aside elements seems very artificial. Is this defined in the EPUB specification? Should the match be based solely on the epub:type value?
There was a problem hiding this comment.
Yeah so I can tell that at least, iBooks is matching aside, div, and p since they offer two different options to authors as regards hiding the footnote in the normal reading flow (a.k.a. main body):
- hiding when
asideis used; - not hiding it when either
divorpare used.
See note @ the bottom of https://help.apple.com/itc/booksassetguide/#/itccf8ecf5c8.
You can be sure a large portion of eprdctn knows about that.
On another amusing note, they expect authors to set the direction inline in case of RTL.
There was a problem hiding this comment.
Sure, but if I remember correctly, your example used aside + epub:type=footnotes (plural), with nested div + epub:type=footnote (singular). So I modified your example by swapping the div and aside elements so that it would work correctly in Readium (this code). Perhaps it was a typo at your end? Or was it intentional?
There was a problem hiding this comment.
Yeah that was intentional → div + epub:type="footnote" was there to have the footnote displayed at the end of the XHTML file. If it were aside + epub:type="footnote" then iBooks would hide it from the body of the XHTML file.
Disclaimer: there’s been a lot of a11y issues with popup footnotes in iBooks e.g. screen reader can’t access the contents so others may have used aside + nested div as well – that + voice over has very weird behaviors in multicol e.g. alt not being read for images when they happen to be laid out at the top of a column.
There was a problem hiding this comment.
Okay thanks for the clarification :)
There was a problem hiding this comment.
And ref to part of their logic if needed: https://gist.github.com/dvschultz/9caba7f9058596451744#file-cfi-js-L1202-L1294
There was a problem hiding this comment.
+ why only asides are hidden and not others: https://github.com/FriendsOfEpub/WillThatBeOverriden/blob/master/ReadingSystems/iBooks/OS%20X/user_stylesheet_flowable.css.tmpl#L232-L234
|
|
||
| if (epubType == "noteref" && $element[0].localName === "a") { | ||
| sources.push($element); | ||
| } else if ((epubType == "footnote" || epubType == "note" || epubType == "rearnote") && $element[0].localName === "aside") { |
There was a problem hiding this comment.
See above comment about aside restriction.
See description in the viewer PR: Waffle connects to readium/readium-js-viewer#505