Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPUB3 "popup" footnotes #270

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

EPUB3 "popup" footnotes #270

wants to merge 16 commits into from

Conversation

danielweck
Copy link
Member

@danielweck danielweck commented Mar 11, 2016

See description in the viewer PR: Waffle connects to readium/readium-js-viewer#505

if (sourceIDREF === ("#" + targetID)) {

target.hide();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fjansen
Copy link

fjansen commented Oct 26, 2017

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") {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 aside is used;
  • not hiding it when either div or p are 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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay thanks for the clarification :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@JayPanoz JayPanoz Oct 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


if (epubType == "noteref" && $element[0].localName === "a") {
sources.push($element);
} else if ((epubType == "footnote" || epubType == "note" || epubType == "rearnote") && $element[0].localName === "aside") {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above comment about aside restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants