MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Plugins (https://www.mobileread.com/forums/forumdisplay.php?f=268)
-   -   [Plugin] ACE - DAISY EPUB Accessibility Checker wrapper (https://www.mobileread.com/forums/showthread.php?t=294678)

Doitsu 06-06-2019 06:55 AM

Quote:

Originally Posted by polizoto (Post 3853400)
Has there been any progress on this issue? Thanks!

No. I still don't know how to fix this. However, you could try the Calibre version by thiago.eec.
If the Calibre version works on your Mac, I might be able to update the code for Macs.

cmcclaflinprcvi 09-10-2019 01:38 PM

Error: Using unsupported cfi feature
 
We've been using this plugin for quite a while now, and we're suddenly getting an error!

I cannot seem to track down why. We've tried using older / current versions of sigil, ace is installed at 1.1.1, we're running windows 10. It also seems to not be related to our epub, as we're able to open sigil and have a new file created, save it, run, and we still get the error. We've also verified the error occurs on several machines. Is anyone else getting this error now?

Status: failed

Running ACE ... please wait.

Traceback (most recent call last):
File "C:\Users\*redacted*\AppData\Local\sigil-ebook\sigil\plugins\ACE\plugin.py", line 155, in run
res = cfi_convert(bk, real_epubcfi)
File "C:\Users\*redacted*\AppData\Local\sigil-ebook\sigil\plugins\ACE\cficonvert.py", line 37, in cfi_convert
raise CFIConvertException("Error: Using unsupported cfi feature")
cficonvert.CFIConvertException: Error: Using unsupported cfi feature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 135, in launch
self.exitcode = target_script.run(container)
File "C:\Users\*redacted*\AppData\Local\sigil-ebook\sigil\plugins\ACE\plugin.py", line 159, in run
print(str(e))
NameError: name 'e' is not defined
Error: name 'e' is not defined

Doitsu 09-10-2019 02:18 PM

Quote:

Originally Posted by cmcclaflinprcvi (Post 3888348)
We've been using this plugin for quite a while now, and we're suddenly getting an error!

I was able to reproduce this error with ACE 1.1.1. Most likely the Daisy/ACE developers have changed the .json output format.

I'll investigate and try to update the plugin.

Doitsu 09-11-2019 09:07 AM

Quote:

Originally Posted by cmcclaflinprcvi (Post 3888348)
We've been using this plugin for quite a while now, and we're suddenly getting an error!

I've updated the plugin and attached a new version to the first post. Please note that the ACE developers apparently haven't implemented the July 2019 recommendations of the EPUB Type to ARIA Role Authoring Guide.

For example, ACE will flag the following tag:

Code:

<body epub:type="chapter" id="chapter001">
because there's an equivalent doc-chapter ARIA role, however, it can only be used on <section> tags.

cmcclaflinprcvi 09-12-2019 03:59 PM

All fixed up!
 
Thanks so much for your quick response, we've tested and this seems to have resolved the issue!

jennie2486 12-13-2020 03:13 AM

Hi,
I have been trying to use the ACE plugin with Sigil, and keep running into problems. I'm hoping someone can help me. I have used ACE with Calibre and have never had a problem. When trying to install in Sigil, I followed the instructions to use the command: $ npm install -g @daisy/ace.

I kept getting the message: '$' is not recognized as an internal or external command. Then I realized I installed the Calibre plugin without the $, so ran it without, and it installed no problem. Anybody know why ACE says to use $ yet I get '$' is not recognized as a command? (My apologies if this is dumb question, I am a beginner.��)

Next I attempted to run it through Sigil and received an error message: 'ace' is not recognized as an internal or external command, operable program or batch file.

I went back to the command window and tried to run some commands suggested. Had no problem when asking for help, and the version. (As long as I left out the $).

When I ran: ace ~C:/Books/Looking for Clara - Simona Grossi.epub

error: Couldn’t find EPUB file
info: Closing logs.
Re-run Ace using the --verbose option to enable full debug logging.

When I ran: ace --verbose I got: error: Input required

Ace by DAISY, an Accessibility Checker for EPUB

Usage: ace [options] <input>

Options:

-h, --help output usage information
-v, --version output the version number

-o, --outdir <path> save final reports to the specified directory
-t, --tempdir <path> specify a custom directory to store the temporary reports
-f, --force override any existing output file or directory
--subdir output reports to a sub-directory named after the input EPUB

-V, --verbose display verbose output
-s, --silent do not display any output

-l, --lang <language> language code for localized messages (e.g. "fr"), default is "en"
Examples
$ ace -o out ~/Documents/book.epub

I even tried several variations of the: ace ~/C:/Books/Looking for Clara - Simona Grossi.epub. I even copied the path from my file explorer and tried that: ~C:\Books\Looking for Clara - Simona Grossi.epub. I get the the same error every time.

Please, I am lost and don't know what to do. It's probably something basic that I did wrong, I am a beginner.

Doitsu 12-13-2020 03:45 AM

Quote:

Originally Posted by jennie2486 (Post 4068474)
Anybody know why ACE says to use $ yet I get '$' is not recognized as a command?

The ACE authors erroneously assumed that ACE will be primarily used by Linux and macOS users.
($ is the default Linux/macOS terminal command line prompt.)

Quote:

Originally Posted by jennie2486 (Post 4068474)
When I ran: ace ~C:/Books/Looking for Clara - Simona Grossi.epub [...]

If ACE was properly installed and Thiago's Calibre ACE plugin works, you shouldn't have to use the command line at all.

If you want to test whether ace works, you'll need to enclose path names in double quotation marks and omit the tilde.

Code:

ace "C:/Books/Looking for Clara - Simona Grossi.epub"
If you don't get any ACE error messages, the ACE plugin should work.
(You should see some messages with curly braces, but that's by design.)
If the plugin doesn't work, please copy and paste the complete plugin output.

Also please provide the following information:
1. Operating system
2. Sigil version

jennie2486 12-13-2020 10:23 PM

Hi,
I'm pleased to say, I have figured everything out. I now have ACE running successfully on both terminal and Sigil.

I've also figured out the "$" meant to run the code in the terminal, (not to run the $ as code). :smack: The rest of my problem had to do with the space in my epub's file location.

I am very happy to have the plugin working! Thanks for an awesome plugin. :thanks:

jennie2486 12-29-2020 02:15 AM

I wonder if anyone else has experienced the same issue as me. After running Access-Aide on an epub 2 and then running ACE, ACE consistently flags the same 4 errors:

Code:

content.opf Serious  Publications must declare the 'schema:accessMode' metadata
content.opf Moderate  Publications must declare the 'schema:accessModeSufficient' metadata
content.opf Serious  Publications must declare the 'schema:accessibilityFeature' metadata
content.opf Serious  Publications must declare the 'schema:accessibilitySummary’ metadata

Yet, I've run Access-Aide and made sure all 4 are there:

Code:

<meta content="This publication conforms to WCAG 2.0 AA." name="schema:accessibilitySummary"/>
<meta content="textual" name="schema:accessMode"/>
<meta content="textual" name="schema:accessModeSufficient"/>
<meta content="structuralNavigation" name="schema:accessibilityFeature"/>

However, if I use ACE on an epub 3, after running Access-Aide, I get no errors. I re-read the summaries on both Access-Aide and ACE, neither one said anything about not working for epub 2's.

Is this normal?

elibrarian 12-29-2020 04:39 AM

Quote:

Originally Posted by jennie2486 (Post 4074870)
I wonder if anyone else has experienced the same issue as me. After running Access-Aide on an epub 2 and then running ACE, ACE consistently flags the same 4 errors:

Code:

content.opf Serious  Publications must declare the 'schema:accessMode' metadata
content.opf Moderate  Publications must declare the 'schema:accessModeSufficient' metadata
content.opf Serious  Publications must declare the 'schema:accessibilityFeature' metadata
content.opf Serious  Publications must declare the 'schema:accessibilitySummary’ metadata

Yet, I've run Access-Aide and made sure all 4 are there:

Code:

<meta content="This publication conforms to WCAG 2.0 AA." name="schema:accessibilitySummary"/>
<meta content="textual" name="schema:accessMode"/>
<meta content="textual" name="schema:accessModeSufficient"/>
<meta content="structuralNavigation" name="schema:accessibilityFeature"/>

However, if I use ACE on an epub 3, after running Access-Aide, I get no errors. I re-read the summaries on both Access-Aide and ACE, neither one said anything about not working for epub 2's.

Is this normal?

Sort of, yes. The Epub Accessibility specs tells you it's made for both epub2 and epub3 - in the real world, if you wan't to make accessible epubs, forget about epub2 - it's the road to insanity.

Regards,

Kim

KevinH 12-29-2020 05:12 PM

In the daisy/ace epub-utils/epub-parser.js it only extracts epub3 style meta tags (those using the "property" attribute) and dc: tags, but has no code to extract a epub2 style meta tag with name and content attributes.

Thus you get that false error message. You can choose to ignore that false error but if you truly care about accessibility then opting for an epub3 is probably your best path forward.

That said a bug report against daisy-ace to support epub2 metadata meta tags in epub2 OPF couldn't hurt.

graycyn 09-14-2021 12:38 AM

First, thanks for the plugin!

I just today installed the Ace by Daisy app and the plugin. However, running my first ePUB through it came up with ONE single, solitary, but supposedly serious error, the gist of which is that I need to:

Add a 'schema:accessibilityHazard' metadata property to the Package Document

FWIW, the epub is fiction, primarily text, there are no flashing hazards or audio hazards or anything I can think of that could be hazardous about it! There are: a cover image (JPG), a title page image (PNG), a author photo (JPG) and one small vector image (SVG).

There is no audio, video, or any kind of script calling such, no links to external content, no embedded fonts, it's a very simple little epub of a 150 page novel.


I'm old and not so technical, could someone tell me how to add this to my epub with the Sigil metadata editor? Because if it's a problem on this epub, it's going to crop up in any other epub I make.

Or if it's not doable in the Sigil metadata editor, does anyone know what I should put in the .opf directly?

It sounds like I would need to declare a value of "none" for the 'schema:accessibilityHazard' metadata property.

EDIT: Can I just stick something like this in the .opf?

Code:

<meta property="schema:accessibilityHazard">none</meta>
I tried it and it seems to make ACE by Daisy happy. EPUBCheck didn't have anything against it either.

KevinH 09-14-2021 11:08 AM

Based on the Daisy docs shown here:

http://kb.daisy.org/publishing/docs/...ityHazard.html

that should be absolutely correct.

I am just not sure why it is even needed if there is no audio or video resources. Have you added the metadata that tells the user that this is a text only epub:

ie:

schema:accessMode
schema:accessModeSufficient

set to be "textual".

See:

http://kb.daisy.org/publishing/docs/...ccessMode.html

http://kb.daisy.org/publishing/docs/...ufficient.html

graycyn 09-14-2021 04:58 PM

Thanks, Kevin!

I had run my epub through Access-Aide plugin prior, this is what was already in the metadata when I ran it through the Ace by Daisy app:

Code:

    <meta property="schema:accessibilitySummary">This publication conforms to WCAG 2.0 AA.</meta>
    <meta property="schema:accessMode">textual</meta>
    <meta property="schema:accessMode">visual</meta>
    <meta property="schema:accessModeSufficient">textual</meta>
    <meta property="schema:accessibilityFeature">structuralNavigation</meta>

So I didn't have it *exactly* like the examples in your link, though I would've thought it would be good to go. So I tried changing to the version below, like your link:

Code:

  <meta property="schema:accessModeSufficient">textual,visual</meta>
I stripped the schema:accesibilityHazard line out, ran through Ace by Daisy again, NO DIFFERENCE! Same error. It wants that Hazard metadata!


There's NOTHING in the epub that wasn't put there by me, Sigil, Access-Aide or the Pagelist plugin. The only things I can remotely imagine triggering this are the non-transparent title page image (a shocker in night mode, but transparency creates black on black in most apps) and I do have a few Spanish words marked up with:

Code:

xml:lang="es"
I was so puzzled, last night I ran a very recently purchased epub (HarperCollins, Stargazer by Anne Hillerman) and Ace by Daisy did not flag it as having any serious violations (some 300+ minor ones, tho). I opened Stargazer up in Sigil, took a look and lo and behold, they have SEVERAL schema:accessibilityHazard statements, even though there doesn't appear to be anything more hazardous about their ebook than mine. Their title page image is also non-transparent, FWIW. No audio, video, fonts or miscellaneous in their book either. They had three images, all JPG.

Here's what they had:

Code:

    <meta property="schema:accessibilityHazard">noFlashingHazard</meta>
    <meta property="schema:accessibilityHazard">noSoundHazard</meta>
    <meta property="schema:accessibilityHazard">noMotionSimulationHazard</meta>

So the mystery remains. I just can't imagine why my little book would be flagged as needing this particular metadata. I can see no reason the HarperCollins book would require it either. But I guess I best have it in there.

Question, should I go with the value as none which appeared to satisfy ACE by Daisy, or copy what HC did?

I'm a hobbyist, I have no idea what all the accessibility requirements are, I'd just like to cover the bare-bones basics and have my book pass the check.

graycyn 09-14-2021 05:34 PM

I also found this page where they write it slightly differently:


Code:

  <meta property="schema:accessibilityHazard">noFlashing</meta>
    <meta property="schema:accessibilityHazard">noSound</meta>
    <meta property="schema:accessibilityHazard">noMotionSimulation</meta>

Though as far as I can tell, if there are no hazards, the simpler version of:

Code:

<meta property="schema:accessibilityHazard">none</meta>
is perhaps more correct.

From https://www.w3.org/wiki/WebSchemas/Accessibility it says:

Quote:

If none of the hazards are known to exist instead of calling out each nonHazard it is recommended to use "none".
So I guess I've more or less answered my own question! :D Maybe it'll help some other confused soul who has the itch to make ebooks.


All times are GMT -4. The time now is 08:24 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.