epubjs
Version:
Render ePub documents in the browser, across many devices
52 lines (48 loc) • 3.48 kB
HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>The Coded Word: Scripted Interactivity</title>
<link rel="stylesheet" type="text/css" href="css/epub.css" />
<meta name="dat-origPath" value="/html/body" /><link rel="prev" href="./ch03s04_0.html" /><link rel="next" href="./ch03s05_0.html" /></head><body>
<p data-origPath="/html/body/section/p[7]">Don’t worry that this requirement means all the potential scripting fun is being
taken out of ebooks, though. Games and puzzles and animations and quizzes and any
other secondary content you can think of that requires scripting are all fair game
for inclusion. But when it comes to including these there are two considerations to
make, very similar to choosing when to describe images:</p>
<ul class="itemizedlist" data-origPath="/html/body/section/ul[2]">
<li class="listitem"><p>Does the scripted content you’re embedding include
information that will be useful to the reader’s comprehension (demos, etc.),
or is it included purely for pleasure (games)? </p></li>
<li class="listitem"><p>Can the content be made accessible in a usable way and can
you provide a fallback alternative that provides the same or similar
experience?</p></li>
</ul>
<p data-origPath="/html/body/section/p[8]">The answer to the first question will have some influence how you tackle the second.
If the scripted content provides information that the reader would otherwise not be
able to obtain from the prose, you should consider other alternative forms for
making that information available, for example:</p>
<ul class="itemizedlist" data-origPath="/html/body/section/ul[3]">
<li class="listitem"><p> If you script an interactive demo using the <code class="literal">canvas</code> element, consider also providing a
transcript of the information for readers who may not be able to interact
with it. </p></li>
<li class="listitem"><p> If you’re including an interactive form that automatically
evaluates the reader’s responses, also include access to an answer key.
</p></li>
<li class="listitem"><p> If you’re adding a problem or puzzle to solve, also provide
the solution so the reader can still learn the steps to its completion.
</p></li>
</ul>
<p data-origPath="/html/body/section/p[9]">None of the above suggestions are intended to remove the responsibility to try and
make the content accessible in the first place, though. Scripting of accessible
forms, for example, should be a trivial task for developers familiar with WAI-ARIA
(we’ll look at some practices in the coming section). But trivial or not, because
scripting will not necessarily be available, it’s imperative that you provide other
means for readers to obtain the full experience.</p>
<p data-origPath="/html/body/section/p[10]">If the scripted content is purely for entertainment purposes, however, create a
fallback commensurate with the value of that content to the overall ebook (if it
absolutely cannot be made accessible natively). Like decorative images, a reader
unable to interact with non-essential content is not going to be hugely interested
in reading a five-page dissertation on each level of your game. A simple idea of
what it does will usually suffice.</p>
</body>
</html>