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

Add title attribute to epub.js iframe #81

Open
5 tasks
jmcglone opened this issue Sep 25, 2017 · 1 comment
Open
5 tasks

Add title attribute to epub.js iframe #81

jmcglone opened this issue Sep 25, 2017 · 1 comment
Milestone

Comments

@jmcglone
Copy link
Member

jmcglone commented Sep 25, 2017

<iframe id="epubjs-view-f834724f-c9f5-4b2e-b4c6-e87254fe0b2e" scrolling="no" style="overflow: hidden; border: medium none; visibility: visible; width: 1668px; height: 270px;" srcdoc="<html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:epub=&quot;http://www.idpf.org/2007/ops&quot;>

  • add the book title(?) as the value to the title attribute
  • add role=main to the iframe element

Fix any of the following:

  • aria-label attribute does not exist or is empty
  • aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty or not visible
  • Element has no title attribute or the title attribute is empty
@mbakeryo mbakeryo added this to the Fall milestone Oct 19, 2017
@respinos
Copy link
Collaborator

respinos commented Nov 9, 2017

Note: we can solve this inside cozy-sun-bear with hooks. Vaguely:

this._rendition.on("rendered", function(section, view) {
  var index = this._book.navigation.tocByHref[section.href];
  var label = this._book.toc[index].label;
  view.iframe.setAttribute("title", label);
}).bind(this);

...and taking into account when this section is not found in the table-of-contents.

@jmcglone - should the title have a particular prefix? Contents of 4 From Sermon to Scripture?

@mbakeryo mbakeryo modified the milestones: Fall, Winter Nov 29, 2017
@mbakeryo mbakeryo added the ready label Feb 28, 2018
@mbakeryo mbakeryo modified the milestones: Winter, Spring Feb 28, 2018
@mbakeryo mbakeryo removed the ready label Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants