Access-Aide, a New EPUB Accessibility Plugin for Sigil
Your Ally in #a11y
My appreciation of Sigil as an EPUB editor is longstanding. I don’t use anything else—no oXygen, no Dreamweaver, nada.
One of Sigil’s handy ebook-specific features is its ability to run handy ebook-specific plugins written by ebook developers—and one of the great things about plugins is they can ease the painful transition from a deprecated format to whatever is replacing it. Sigil’s ePub3-itizer plugin, for example, painlessly converted EPUB 2 files into EPUB 3 files when we were all still confused about that. Poof, new file, totally functional and validating, even if you weren’t really clear yet on why, exactly, we needed this new format in the first place.
One recent shift in ebooks isn’t a format, but an approach: #a11y (short for “accessibility”) isn’t an ebook standard so much as a roster of things that will make ebooks less frustrating and more consumable for people who use screen readers.
That being the case, a Sigil accessibility helper can’t just take your file and a11y-itize it out of thin air. A human has to add alt text, know what language the book is in, code context breaks as
<hr/>s instead of margin-tops or empty lines, and stuff like that. However, there are tasks that can be automated, and Access-Aide does these (parentheticals mine):
xml:langattributes to the html element
(It gets these from the
- Fill in any missing title tag that is a child of the head tag
(It gets these from what you’ve written in the nav file, and will only work if the title tag is empty; even whitespace will break it)
- Add an empty
altattribute to any
imgtag without one
- Collect a list of all image tags and their current alt text descriptions
(The plugin will then interrupt itself to show you a GUI of all of these, allowing you to change them)
- Add appropriate
epub:typesemantic tags to each xhtml file (for EPUB 3 only)
(It gets these from the landmarks in the nav file, which you’ve either used Sigil’s quick-and-easy Semantics tool to specify, or hand-coded)
epub:typeattributes to their appropriate aria role attribute
(It gets these from existing epub:type attributes, plus those it added in step 5)
The documentation says that before running the plugin, 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
What it means by “adding the appropriate semantic tags” is making sure all the stuff in the above parentheticals exists in your
.epub; any step that relies on something that isn’t there won’t produce any result.
I really like this plugin. Like many of Sigil’s other features and plugins, (generate an
.ncx from the
nav file, tell you where CSS styles are used, etc.), it’s something an ebook developer will actually use. I can say that with confidence because I’m now using it on every book.
A note about Sigil plugins: They’re
.zip files, and they need to stay that way when you install them in Sigil. Don’t unzip them.
Get Access-Aide from GitHub.