One of the late additions to the EPUB 3.0.1 revision was the very newly minted
aria-describedat attribute. As you might guess from the title of this post, while it’s technically available now, using it may not have the desired effect for the obvious reason that it’s going to take time before it finds support in reading systems.
Similar to my last post, the attribute adds to a running list of possible ways to add descriptions. There was, of course, the
longdesc attribute, which was dropped from HTML5, found life again as an extension, but despite that is still largely unsupported (and not available in EPUB 3). The major drawback of
longdesc was not that it is was too complex, which was some of the FUD spread to discredit it, but that it was limited to the
img tag. While describing images is an important use case, it’s far from the only one.
There’s also the ARIA 1.0
aria-describedby attribute, which improves on
longdesc by being attachable to any element, but is limited in that it can only point to elements on the current page. This is the one we’ve been recommending for use in EPUB 3 documents, either referencing a
details element (which provides a mechanism for collapsible descriptions) or a hidden
iframe element (unlike
hidden content generally, which does not get announced, specifically pointing to such content from this attribute does make it available).
If you’re still following, the case that’s missing from this picture is being able to point from any element to a description that may or may not be on the same page: combining the major feature of
longdesc with the universality of
aria-describedby. Of course, that’s where
aria-describedat comes in, allowing you to locate your description anywhere your heart pleases (including outside the EPUB container).
The new attribute doesn’t render
aria-describedby useless, but does limit some of its usefulness (the major difference is that
aria-describedat takes a single URI as a value, while
aria-describedby can take a list of IDs, but that flexibility often isn’t needed). But don’t run out and start changing all your usage of
aria-describedat quite yet, even if sounds like it will meet all your needs.
The problem is that ARIA 1.1 is still only a first working draft, so even though this new attribute sounds like a godsend, it’ll inevitably be some time before support appears, and then more time after that before support becomes universal.
So where does that leave you if you’re looking for a mechanism to reference external descriptions in EPUB? Well, stuck with
aria-describedby for now. You can use it to point to an
iframe which in turn can reference another content document, allowing a small measure of external referencing (the limit being that the
iframe has to point to a document in the EPUB container). But until
aria-describedat support materializes, there’s not much else you can do.
So welcome to the future, but remember to look, not touch.
It looks like aria-describedat is toast, so expect it to be dropped in EPUB 3.1. The kludge-ish use of aria-describedby to point to a details element containing an iframe element that references an external file is the way of the future for out-of-band descriptions, for now. But as details is not well supported, and not yet valid in EPUB…