[Plugin] Access-Aide - help improve epub accessibility
#1  KevinH 02-17-2018, 03:49 PM
Updated: February 3, 2021
Current Version: "0.5.2"

See the Attached:

Official Guthub site:

Changes since the Previous Release
- version 0.5.2 - fix Windows mixed case path bug, extra whitespace bug in xmlheader, handle self-closing title tags when updating titles
- version 0.5.1 - fix typo in variable name bug path vs apath
- version 0.5.0 - update to work with new Sigil 1.0 plugin interface
- version 0.4.3 - sync to master, do not add epub:type to body tags
- version 0.4.2 - update rules to assign aria roles based on epub 3.2/3.02 spec
- version 0.4.0 - initial release

License/Copying: GNU LGPL Version 2 or Version 3, your choice. Any other license terms are only available directly from the author in writing.

Minimum Sigil Version: support for this plugin is provided for Sigil 0.9.0 and later using the Python 3.4 or later Python interpreter.

The goal of this program is to help improve the Accessibility of your epub to help meet ACE requirements. It strives to create an epub that meets the following criteria:

schema:accessMode: textual
schema:accessMode: visual
schema:accessModeSufficient: textual
schema:accessibilityFeature: structuralNavigation
schema:accessibilitySummary: This publication conforms to WCAG 2.0 AA.

Before you run Access-Aide
Before running AccessAide you should make sure your epub has passed epubcheck and that you have properly added the appropriate semantic tags to mark your ebook files appropriately.

How it Works
This edit plugin will read/edit the content.opf to determine the primary language used, identify any nav or ncx and will add the appropriate metadata.
The ncx or nav is then parsed to collect titles for every xhtml file and in the case of the nav will also collect epub:type landmark information.

Then for each xhtml file, the plugin will:
1. add lang and xml:lang attributes to the html element
2. fill in any missing title tag that is a child of the head tag
3. will add empty alt attributes to any img tag where it is missing
4. collect a list of all image tags and their current alt text descriptions
5. add in appropriate epub:type semantic tags (for epub3 only)
6. map epub:type attributes to their appropriate aria role attribute

Then a graphical user interface is generated showing a thumbnail of every img tag image and its associated alt text description, so that the user can easily and quickly add improves textual descriptions for each image used

Limitations ...
1. In able to properly achieve the schema:accessModeSufficient: textual critieria, Access-Aide will abort when provided with epubs that use javascripts, audio resources, video resources, and mathml because Access-Aide simply can not tell if the proper textual descriptions are provided in these cases.

2. svg image tags images are ignored as the "alt" attribute is not allowed on those tags. The proper way to handle svg: image tags is to provide the proper title and desc elements immediately after the svg start tag that contains the image element.

Access-Aide Plugin icon
This plugin includes a plugin icon that is in the public domain and provided by the The Accessible Icon Project that can be found at: for the express purpose for promoting accessibility.

Thanks to DiapDealer, Doitsu, and elibrarian with their help testing and debugging earlier versions of the this plugin and for elibrarian for for promoting the idea in the first place.

For access to fixes before the next release see my github repo for Access-Aide:
[zip] (238.2 KB, 391 views)
[zip] (238.5 KB, 93 views)

#2  roger64 02-18-2018, 11:04 PM

Thank you for this nice plugin!

Display question

I tried it with an Epub3 produced by ODTImport which passes Epubcheck. ODTImport produces a Text/nav.xhtml which I like to place at the end of all files and to add a link with my stylesheet.
It looks like this :
Spoiler Warning below

<head> <title>EPUB 3 Navigation Document</title> <link href="../Styles/styles.css" rel="stylesheet" type="text/css"/>
<body> <nav epub:type="toc"> <ol> <li> <a href="../Text/chapter3.xhtml">Quatrième de couverture</a> </li> <li> <a href="../Text/chapter6.xhtml">Préface</a> </li>

Once I have added semantics, your plugin adds under this nav (in the same xhtml file) the new landmarks nav.

Spoiler Warning below

<nav epub:type="landmarks" id="landmarks" hidden="" role="directory"> <h1>Points de repère</h1> <ol> <li> <a epub:type="cover" href="../Text/Chapitre-00.xhtml" role="doc-cover">Couverture</a> </li> <li> <a epub:type="titlepage" href="../Text/Chapitre-02.xhtml">Page de Titre</a> </li> <li> <a epub:type="copyright-page" href="../Text/Chapitre-03.xhtml">Page de Copyright</a> </li>

This one is displayed only with the Prince PDF and appears neither in Sigil or in Calibre editor preview. It appears though in Code View with the Calibre editor.

Also to the previous nav has been added the expression : role="doc-toc"

What did I miss to make it appear in Code view and display in preview?

#3  roger64 02-19-2018, 04:12 AM

I got a side help and -needed- explanation. It seems that the landmarks nav is not to be displayed in code view (hidden " ") and that Prince should in fact not display it.

So it was a misunderstanding of mine. The modified Epub3 with its new semantics attributes and the changes made with the Access-Aide plugin is just fine.

I learnt something. Thanks again for this plugin.

#4  KevinH 02-19-2018, 08:35 AM
The landmarks are to epub3 very much like the opf guide in epub2. Its entries are used to mark files as to their functional/structural role. They are a required part of a valid nav as the guide itself has been deprecated in epub3. The landmarks section of the nav is typically not displayed directly and is instead meant to be machine readable.

Both epub:type and aria role attributes are meant to be used by the ebook author/developer to add semantic information to aide structural navigation of the epub, and provide screen readers for use by readers with vision impairment or other accessibility issues more information to help better convey the epub.

#5  LauraB7 04-10-2018, 04:19 PM
I am so excited about this plugin. But I can't get it to work. Can someone point me in the right direction? When I try to load it via "Manage Plugins", navigate to the folder containing it, etc., everything is greyed out and not chose-able.

I have a feeling I am missing something that is mean to be installed underneath Sigil, but I don't know what it is.

Any help would be greatly appreciated.

#6  KevinH 04-10-2018, 06:43 PM
A Sigil plugin is a zip file. It should not be unzipped further. The install process will properly handle that.

Many people have download managers or browsers that unzip zip archives automatically when they are downloaded. These will mess up the downlad. Try using a brower like Firefox and right click on the link for the plugin and tell Firefox just to download it and not try to unpack it.

#7  LauraB7 04-11-2018, 03:52 PM
Thank you!

#8  noteon 04-27-2018, 01:52 PM
I'm doing a quick writeup of this plugin for, and have a couple of questions. Is this the right place to ask them?

#9  KevinH 04-27-2018, 04:50 PM
Yes, this is the right place to ask questions about this plugin. There is some explanation of exactly what this plugin does in the first post of this thread.

#10  noteon 04-30-2018, 08:05 PM
Thanks! A few things I'm unclear on:

1. The readme says to make sure you have "properly added the appropriate semantic tags to mark your ebook files appropriately." Then in the list of things the plugin does, #5 says it will "add in appropriate epub:type semantic tags," and #6 says it will "map epub:type attributes to their appropriate aria role attribute."

What semantic tags should the author have added? Are they something besides the epub:type semantic tags specified in #5? My best guess is the author must manually code epub:type semantic tags before running the plugin, and that only #6 is actually performed by the plugin, not #5. Is this correct?

2. In #2, the plugin "fills in any missing title tag that is a child of the head tag." Is this the text it collects when "The ncx or nav is then parsed to collect titles for every xhtml file?" I was not able to get this to work; is there a precondition of some sort in the xhtml file?

I think that's it, at least for the moment. It's a useful plugin, and I'd like to make sure I represent it accurately in the article.

  Next »  Last »  (1/7)
Today's Posts | Search this Thread | Login | Register