![]() |
[Plugin] ACE - DAISY EPUB Accessibility Checker wrapper
1 Attachment(s)
Updated: October 4, 2019
Current Version: "0.2.2" This plugin is a simple DAISY ACE (=Accessibility Checker for EPUB) wrapper. Credits: This plugin uses an epubcfi module originally written by Kovid Goyal, which was adapted for Sigil by KevinH. System requirements: This plugin requires Sigil 0.9.5 or higher. Obviously, you'll also need to install DAISY ACE. (Theoretically, the plugin should work on Macs, too, however, I couldn't get it to work on a Mac.) Installation: 1. Visit the Inclusive Publishing website and follow the ACE installation instructions. 2. Select Manage Plugins from the Plugins menu and select Use Bundled Python, if it isn't already selected. 3. Click Add Plugin and select ACE_v0.2.2.zip. This will install the plugin, which you can select via Plugins > Validation > ACE. If ACE doesn't crash, it'll display all messages in the validation panel and in the default browser. If you don't want the plugin to display the results in a web browser change the following value in the ACE.json preferences file to false. Code:
{Known Issues: Since the developers apparently haven't implemented the July 2019 recommendations of the EPUB Type to ARIA Role Authoring Guide, ACE 1.1.1 might erroneously flag some tags that can't have ARIA roles attributes. License: GNU General Public License v3 (GPL-3) |
Quote:
And thanks for the plugin, it spares my old fingers some clicks :thumbsup: Regards, Kim |
Hi Doitsu,
I have modifed Kovid's Calibre cfi parsing code to run purely on Python 3 and to return stepnums in a manner that make sense to me (with -1 step indicators to indicate redirection) . With this new cfiparse.py code I should be able write an edit plugin that uses the bk to quickly convert the cfi to find the name of the problem file. I will then write some new code to walk the gumbo tree dom and return a line number and hopefully a correct character offset. With this information, you should be able to create a validation plugin that will work fully inside Sigil. Give me another week or so to put something together. KevinH |
Quote:
I really appreciate your efforts and will update the plugin once you've released the code. |
|
Quote:
|
Thanks to KevinH's help, I was able to convert the plugin from an edit plugin to a validation plugin.
I've attached a new version to the first post. |
Thanks for the great plug in. Able to install and run it without a hitch- good work!
|
Quote:
|
Quote:
The plugin fails though. When I look at details, I see: "Status: failed Running ACE ... please wait. -V: ace command not found" |
Quote:
Quote:
|
Hi, Doitsu.
Thank you for this great plugin! I've been using ACE BY DAISY for a while as a command line tool. It's really great to use it integrated with Sigil. Now... I wish this Plugin would be available for Calibre Editor as well. =) Can it be done? |
Quote:
|
Quote:
:( ... Thanks, anyway. :thumbsup: |
Any Updates to a Fix for the Macbook?
Quote:
Has there been any progress on this issue? Thanks! Joseph |
Quote:
If the Calibre version works on your Mac, I might be able to update the code for Macs. |
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 |
Quote:
I'll investigate and try to update the plugin. |
Quote:
For example, ACE will flag the following tag: Code:
<body epub:type="chapter" id="chapter001"> |
All fixed up!
Thanks so much for your quick response, we've tested and this seems to have resolved the issue!
|
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. |
Quote:
($ is the default Linux/macOS terminal command line prompt.) Quote:
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"(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 |
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: |
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 Code:
<meta content="This publication conforms to WCAG 2.0 AA." name="schema:accessibilitySummary"/>Is this normal? |
Quote:
Regards, Kim |
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. |
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> |
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 |
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>Code:
<meta property="schema:accessModeSufficient">textual,visual</meta>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"Here's what they had: Code:
<meta property="schema:accessibilityHazard">noFlashingHazard</meta>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. |
I also found this page where they write it slightly differently:
Code:
<meta property="schema:accessibilityHazard">noFlashing</meta>Code:
<meta property="schema:accessibilityHazard">none</meta>From https://www.w3.org/wiki/WebSchemas/Accessibility it says: Quote:
|
Perhaps this is a new check recently added to their Daisy ACE checker. I will update Access-Aide to add the schema:accessibilityHazard none just to be safe. It can not hurt.
|
Quote:
And thanks for your help and appreciation for all the work you do! |
Happy to help. A new Access-Aide v054 is now available with this change.
Please do verify you are not using any animated GIFS in your epub since we set that value to none. Quote:
|
Quote:
Already downloaded and installed! |
| 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.