Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2018, 03:19 PM   #46
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay, I just updated the plugin to v011 and fixed the bug with title updating (including the nav) and added the ability to transfer nav landmark epub:type semantics to the body tag or elements with the appropriate ids if missing. These are then translated to aria roles as available.

Check out the new (still alpha level) plugin attached here:

https://www.mobileread.com/forums/sh...8&postcount=37

Last edited by KevinH; 02-10-2018 at 05:15 PM.
KevinH is offline   Reply With Quote
Old 02-10-2018, 04:30 PM   #47
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@KevinH: Since ACE accepts both epub2 and epub3 books, IMHO, it'd make sense for the plugin to also process epub2 books.

The only changes that you'd have to implement for epub2 books is:

a) changing the metadata section syntax according to this IDPF suggestion:

Code:
<meta name="schema:accessibilitySummary" content="This publication conforms to WCAG 2.0 AA."/>
<meta name="schema:accessMode" content="textual"/>
<meta name="schema:accessModeSufficient" content="textual"/>
<meta name="schema:accessibilityFeature" content="structuralNavigation"/>
b) skipping the ARIA role attribute processing step
Doitsu is offline   Reply With Quote
Advert
Old 02-10-2018, 05:11 PM   #48
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
I would also have to parse the ncx toc to get the info for missing titles instead of the nav, skip epub:type injection, and then skip the aria role assigment as well.

So for right now, I will focus on epub3 only and getting that to work properly with a gui to allow easy editing of alt attributes, and improving semi-automatic semantic epub:type generation and role addition.

Once that is all working, I will change the code to relax the epub3 only restriction.
KevinH is offline   Reply With Quote
Old 02-10-2018, 11:14 PM   #49
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Doitsu,
Based on my reading the aria role attribute is part of the xhtml1.1 spec and so should be legal in epub2 as well.
So can these role attributes be used in epub 2 epubs and still pass epubcheck (for epub2)?

I think FlightCrew may actually complain but I have to verify that.
KevinH is offline   Reply With Quote
Old 02-11-2018, 01:14 AM   #50
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Based on my reading the aria role attribute is part of the xhtml1.1 spec and so should be legal in epub2 as well.
Unfortunately, epubcheck will report them as invalid attributes.

Code:
ERROR(RSC-005): Error while parsing file: attribute "role" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"
Doitsu is offline   Reply With Quote
Advert
Old 02-11-2018, 11:47 AM   #51
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hmm... according to this page (right at the end of the page)

http://www.standardista.com/standard...ations-basics/

We should be able to add an xmlns definition to the html tag even for epub2 to make this legal.

Code:
<html xmlns="http://www.w3.org/1999/xhtml"
   xmlns:aaa="http://www.w3.org/2005/07/aaa" lang="en">
And then adding an aaa:role="doc-chapter" attribute to the body tag should then be perfectly legal for epub2.

I wonder if that would pass epubcheck then?
KevinH is offline   Reply With Quote
Old 02-11-2018, 12:36 PM   #52
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
We should be able to add an xmlns definition to the html tag even for epub2 to make this legal.
Theoretically, this should work, but epubcheck seems to ignore custom namespaces. For example, it's also not possible to use epub:type attributes in epub2 books even if you add a xmlns:epub="http://www.idpf.org/2007/ops" namespace. (BTW, I also tested this with other tags.)

BTW, I used the following epub2 XHTML test file:
Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:aaa="http://www.w3.org/2005/07/aaa" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title></title>
</head>
<body epub:type="chapter" aaa:role="doc-chapter">
<p></p>
</body>
</html>


and got the following error messages:

Quote:
ERROR (RSC-005) at "meta2_test.epub/OEBPS/Text/Section0001.xhtml" (line 9, col 50):
Error while parsing file 'attribute "epub:type" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"'.

ERROR (RSC-005) at "meta2_test.epub/OEBPS/Text/Section0001.xhtml" (line 9, col 50):
Error while parsing file 'attribute "aaa:role" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"'.
Doitsu is offline   Reply With Quote
Old 02-11-2018, 12:50 PM   #53
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Wow! That must be a bug in epubcheck for epub2. They probably will never fix it either. So all of the helpful "role" info simply can not be added to epub2 if people need to pass epubcheck.

So all we can really do for epub2 is the language related attributes on the html tags, fill in the title, add that fixed metadata and use a gui to help add better alt text for images.
KevinH is offline   Reply With Quote
Old 02-11-2018, 01:00 PM   #54
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by KevinH View Post
Wow! That must be a bug in epubcheck for epub2. They probably will never fix it either.
Because of attitude, or because of their current severe lack of developers?
j.p.s is offline   Reply With Quote
Old 02-11-2018, 01:09 PM   #55
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Very few developers, not the latest version of epub, and not too skilled/interested devs.

For example: I once filed a bug report with epubcheck regarding incorrect errors after svg tags including how to recreate the bug with a simple example, and then even deciphered their java code and proposed a simple java fix and nobody did anything with it for over a year or more. It was a very simple fix and immediately obvious (i.e. need to detect end svg elements). The developers either did not understand their own code or simply did not give a damn.

Your mileage may vary.

For the record ... https://github.com/IDPF/epubcheck/issues/680

Mar 16, 2016 -> June 17, 2017

Last edited by KevinH; 02-11-2018 at 01:20 PM.
KevinH is offline   Reply With Quote
Old 02-11-2018, 03:43 PM   #56
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by KevinH View Post
Very few developers, not the latest version of epub, and not too skilled/interested devs.

For example: I once filed a bug report with epubcheck regarding incorrect errors after svg tags including how to recreate the bug with a simple example, and then even deciphered their java code and proposed a simple java fix and nobody did anything with it for over a year or more. It was a very simple fix and immediately obvious (i.e. need to detect end svg elements). The developers either did not understand their own code or simply did not give a damn.

Your mileage may vary.

For the record ... https://github.com/IDPF/epubcheck/issues/680

Mar 16, 2016 -> June 17, 2017
That's sad. Maybe the publishers that require epubcheck passage should fund some bug fixing and maintenance.
j.p.s is offline   Reply With Quote
Old 02-12-2018, 08:34 AM   #57
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 464
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by KevinH View Post
Okay, I just updated the plugin to v011 and fixed the bug with title updating (including the nav) and added the ability to transfer nav landmark epub:type semantics to the body tag or elements with the appropriate ids if missing. These are then translated to aria roles as available.

Check out the new (still alpha level) plugin attached here:

https://www.mobileread.com/forums/sh...8&postcount=37
I've tried the new version on a couple of epub3's - including the first ever epub3 I made, that passed epubcheck a couple of years ago - without any issues. Actually, "the firstever" went from over one hundred errors in ACE to zero immediately.

You asked in a previous post, if I could get som PD booksamples with accessibility features, and I've tried to find some. There are many publishers purporting to distribute accessible epubs, but usually they just use a subset of features (even Matt Garrish doesn't make his own books on accessible epubs accessible ), or the epubs are made from a DAISY talking book source, which makes the coding unnecessary complicated and messy. I've found one that looks ok, though:

https://github.com/benetech/Accessib...Book_v2.2.epub

from Benetech/Diagram Center

The definitive guide, which in it's epub incarnation is supposed to be an example in itself, should be the BISG Quick Start Guide to Accessible Publishing, but you have to be a member to lay your hands on it. (Free personal membership available, but you have to be "approved" - I haven't got approved yet).

<sarcasm>Hey, this is about making books accessible, so let's make the guide as un-accessible as possible.</sarcasm>

On another note: The Accessibility Standard is supposed to be usable on epub 2's also, but I should be surprised if the industry actually went and converted the entire backlist.

Regards,

Kim

Last edited by elibrarian; 02-12-2018 at 08:37 AM. Reason: epub2-commentary
elibrarian is offline   Reply With Quote
Old 02-12-2018, 06:21 PM   #58
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Thanks for those links. Any the irony of having an inaccessible ebook on accessibility is indeed sweet!

I should have a beta version with a gui image alt string editor by the end of the week (hopefully). It is being built with python3 tkinter so it will not be pretty but it should work without any extras.
KevinH is offline   Reply With Quote
Old 02-13-2018, 03:00 PM   #59
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Updated the Access-Aide with a rudimentary GUI for Image alt text6 editing.

See https://www.mobileread.com/forums/sh...8&postcount=37

for version Access-Aide_v020.zip

This plugin is beta quality but has almost all features implemented except for allowing the user to edit the base image width (coming with preference support).
KevinH is offline   Reply With Quote
Old 02-13-2018, 04:30 PM   #60
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
This plugin is beta quality but has almost all features implemented except for allowing the user to edit the base image width (coming with preference support).
When I tested an epub3 book that only contained .svg images, I got the following error message:

Code:
  File "/home/doitsu/.local/share/sigil-ebook/sigil/plugins/Access-Aide/plugin.py", line 359, in run
    f.write(imgdata)
TypeError: a bytes-like object is required, not 'str'
Error: a bytes-like object is required, not 'str'
(The plugin worked fine with non-SVG images.)
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Science Fiction Doctorow, Cory: Someone Comes to Town, Someone Leaves Town v1.0 2007-11-29 JSWolf Kindle Books 3 02-21-2018 10:35 AM
Free (Kindle) Town Without Law by John Russell Fearn [Vintage Town Siege Western] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 3 06-30-2017 06:16 PM
Free (Kindle) The Sheriff of Elk Ridge by Mason Macrae [Town Water Shortage Western] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 2 05-17-2017 11:07 AM
Science Fiction Doctorow, Cory: Someone Comes to Town, Someone Leaves Town v2.0 2007-12-19 JSWolf IMP Books 1 12-19-2007 09:35 AM
Science Fiction Doctorow, Cory: Someone Comes to Town, Someone Leaves Town v1.0 2007-11-29 JSWolf BBeB/LRF Books 5 11-30-2007 08:38 PM


All times are GMT -4. The time now is 06:12 AM.


MobileRead.com is a privately owned, operated and funded community.