by Matt Garrish
Accessible EPUB 3
Matt Garrish
Editor
Brian Sawyer
Copyright © 2012
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected].
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Accessible EPUB 3 and related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
Tools of Change
* * *
Preface
Accessibility is a difficult concept to define. There’s no single magic bullet solution that will make all content accessible to all people. Perhaps that’s a strange way to preface a book on accessible practices, but it’s also a reality you need to be aware of. Accessible practices change, technologies evolve to solve stubborn problems, and the world becomes a more accessible place all the time.
But although there are best practices that everyone should be following, and that will be detailed as we go along, this guide should neither be read as an instrument for accessibility compliance nor as a replacement for existing guidelines.
The goal is to provide you with insights and ideas into how to begin making your publications richer for all readers at the same time that you make them more accessible. Proliferating usability guidelines and muddying the waters of compliance is not its intent. There are areas that would take a book unto themselves to explore in detail in relation to the use of HTML5 content within EPUB, such as the Web Content Accessibility Guidelines (WCAG) and Web Accessibility Initiative’s Accessible Rich Internet Applications (WAI-ARIA). Whenever issues extend beyond what can be covered in these best practices, pointers to where you can obtain more information will be included. Don’t fall into the trap of hand-picking accessibility.
It is also naturally the case with a standard as new and wide-ranging as EPUB 3 that best practices will evolve and develop as the features it offers are explored and implemented. This guide will endeavor to make clear whenever uncertainty exists around an approach, what alternatives there are, and where you should be looking to watch for developments.
You need to be thinking about accessibility and planning good content practices from the outset if you’re going to make the most of the features EPUB 3 has to offer. This guide will be your map, but you have to be willing to follow it.
Note
This guide is envisioned as a living document and intended to be updated and re-released as new practices and techniques evolve.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Caution
This icon indicates a warning or caution.
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Accessible EPUB 3 by Matt Garrish (O’Reilly). Copyright 2012 Matt Garrish, 9781449328030.”
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at [email protected].
Safari® Books Online
Note
Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.
With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.
O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:
http://shop.oreilly.com/product/0636920025283.do
To comment or ask technical questions about this book, send email to:
[email protected]
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Acknowledgments
I would like to thank the following people for their invaluable input, assistance reviewing, and plain general patience answering my dumb questions along the way: Markus Gylling, George Kerscher, Daniel Weck, Romain Deltour, and Marisa DeMeglio from the DAISY Consortium; Graham Bell from EDItEUR; Dave Gunn from RNIB; Ping Mei Law, Richard Wilson, and Sean Brooks from CNIB; and Dave Cramer from Hachette Book Group.
And a special second thanks to Markus, Bill McCoy, and George for the opportunity I was given to be involved in the EPUB revision and to write this guide.
And a final thanks to Brian Sawyer and all the people at O’Reilly for their work putting this guide together!
Chapter 1. Introduction
If you’re expecting a run-of-the-mill best practices manual, be aware that there’s an ulter
ior message that will be running through this one. While the primary goal is certainly to give you the information you need to create accessible EPUB 3 publications, it also seeks to address the question of why you need to pay attention to the quality of your data, and how accessible data and general good data practices are more tightly entwined than you might think.
Accessibility is not a feel-good consideration that can be deferred to republishers to fill in for you as you focus on print and quick-and-dirty ebooks, but a content imperative vital to your survival in the digital future, as I’ll take the odd detour from the planned route to point out. Your data matters, not just its presentation, and the more you see the value in it the more sense it will make to build in accessibility from the ground up.
It’s a common misconception, for example, that any kind of data is accessible data, and that assistive technologies like screen readers work magic and absolve you of paying attention to what’s going on “under the hood,” so to speak. Getting the message out early that this is not the case is essential to making EPUB more than just a minimally accessible format and preventing past mistakes from being perpetuated.
It’s unfortunately too easy when moving from a visual medium like print to treat digital content as nothing more than yet another display medium, however. The simple path is to graft what you know onto what you don’t. But it’s that thinking that perpetuates the inaccessibility of content. Everything starts with the source. All the bells and whistles your reading system can do for you to assist in rendering and playback ultimately rely on the value of the content underneath and the ability to make sense of it.
Treat your data as a second-class citizen and eventually you’ll be recognized as a second-class publisher.
But try and turn your brain off to the word accessibility as you read this guide and focus instead on the need to create rich, flexible, and versatile content that can make the reading experience better for everyone.
Inaccessible content typically means you’re settling for the least value you can get, so get ready to think bigger.
The Digital Famine
Before getting into the best practices themselves, there are two subjects that it would be a lapse for me to not talk about first. The digital famine is the first, as it will hopefully give you some real-world perspective on why accessibility matters.
You’re probably wondering what the famine is, since there are some impressive statistics emerging to show that the ebook revolution isn’t slowing down any time soon. Unfortunately, the numbers aren’t where it matters most yet if you believe in universal access to information. Sales are rising exponentially year over year, but the number of accessible ebooks available at the source is still small.
A commonly cited statistic in accessibility circles is that only about 5 percent of the books produced in any year are ever made available in an accessible format. Although there are signs that this rate is beginning to tick upward with more ebooks being produced, the overall percentage of books that become available in accessible formats still remains abysmally small. Fiction bestsellers are a bright spot, as they’ve been the first to receive the digital treatment, but there’s more to reading than just fiction.
Picture yourself in the situation where you’ll only ever have a spattering of books at your fingertips in any given subject area, and probably none in the more niche topics you delve into. It’s not a matter of finding another bookstore or reading application; those books just aren’t coming and there’s nothing you can do to change it. This dearth of content is what people refer to as the digital famine.
Not a pleasant thought, and it’s a reality that many people are forced to live right now; it’s only imaginary if you’re fortunate not to be affected. The ebook revolution holds out the promise of improvement, as mainstream publishing finds itself suddenly charting the same path as accessible producers, but there are still a number of factors that will contribute to this paltry number for some time to come, including:
New workflows haven’t yet emerged to facilitate the transition. Mass retail ebook production and consumption took many people by surprise, the author included, after earlier failed attempts. Tools and production systems are not optimized for high-quality multi-stream output production, making internal conversion of print to digital costly.
Accessible ebooks can become inaccessible after ingestion into a distribution channel, whether via reformatting to less feature-rich formats or for feature-reduced reading.
The inaccessibility of online bookstores themselves can hinder the ability to obtain ebooks.
Libraries for the blind and other republishers don’t have the resources to completely re-engineer the print-only books still being produced. And this model is a failing one for the long-term ideal of full content accessibility.
But, while depressing in the short term, none of these issues are insurmountable, and none are antithetical to producing good content. It’s only to say that there are interesting times ahead, and to reinforce that there remains much still to be done. The existence of EPUB 3 alone does not cure this famine.
Accessibility and Usability
The other subject that needs treatment is what is meant by accessibility and usability in the context of this guide. These two terms are often used in overlapping fashion, and can mean different things to different people, but I’ll be using the following definitions:
Accessibility of content is the intrinsic capabilities of the EPUB 3 publication: the quality of the data and meaning that can be extracted from it; the built-in navigational capabilities; the additional functionality, like text and audio synchronization (media overlays) and improved synthetic speech. The publisher of an EPUB has control over the accessibility of their publication, whether directly through the tools they use to generate the source or in post-production workflows.
Usability is the ability of a reader to access the content on any given reading system. A publisher may make an EPUB 3 publication rich with accessibility features, but if a reader does not have the right device or software program to access those features it is not the publication itself that is to blame.
But even making these distinctions, there’s no simple answer to what a fully accessible EPUB is, or to what a completely usable reading system is. It means something different depending on your needs.
A person with a print disability, for example, “cannot effectively read print because of a visual, physical, perceptual, developmental, cognitive, or learning disability” (DAISY Glossary). The best method to address any one of these areas is not necessarily the best method to address any of the others. Audio is necessary for readers who are blind, for example, but a reader who is dyslexic might benefit from audio, or from font changes or visual cues, or from a combination of these. There’s no universal answer.
And with EPUB 3 opening the door to new rich multimedia experiences, so too do you need to think beyond traditional print disabilities and recognize that ebooks have the potential to exclude a greater segment of the population if not done with care:
the inability to hear embedded audio and video is a concern for persons who are deaf or hard or hearing;
interactivity and animations that rely on color recognition have the potential to exclude persons who are color blind or have difficulty distinguishing blended contrasts;
the new trend to voice activated devices has the potential to make reading for persons with speech impairments difficult.
The point isn’t to suggest that the problem is too big to try and tackle, in fact the opposite. If you haven’t caught on, I’m making the case why ignoring accessibility means ignoring a large segment of readers who would love to be buying and consuming your ebooks. It is estimated that 10 percent of the population has a print disability; that’s a large market you could be catering to to increase your sales.
And we haven’t yet touched on situational disabilities. A situational disability is one in which a person who would otherwise be able to interact with your ebook is in
a position in which they can’t, or find themselves facing the same limitations. For example:
someone trying to read on a cell phone will gain an appreciation for the difficulty of reading small sections of prose at a time, as someone with low vision experiences when reading using zooming software;
someone attempting to read on their deck on a bright summer day, angling and holding their tablet close to their face to follow the prose, will understand the difficulty experienced by someone with age-related sight loss and/or who has trouble with contrasts;
someone sitting on the subway going home who has to turn on subtitles in an embedded video to read the dialogue will experience how a person who is deaf interacts with the video.
In other words, everyone will benefit from accessible data at some point in their lives, as there are a lot of ways accessible data improves access that aren’t always immediately obvious. Accessibility is critical for some and universally beneficial for all.
The richer you make your data the more intelligently it can be used; so even though you may not be able to accommodate everyone at the end of the day, you can go a long way toward accommodating the majority with a number of simple measures. And that is the focus of this guide.