Skip to content

Commit 16bf008

Browse files
Merge pull request #87 from daisy/extendend-description-bp-update
Best Practices - Extended Description: revisions and improvements
2 parents 512b69d + b705d92 commit 16bf008

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

best-practices/extended-desc/index.html

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
};
3131
// ]]>
3232
</script>
33+
<style>
34+
pre {
35+
white-space: break-spaces !important;
36+
}
37+
</style>
3338
</head>
3439
<body>
3540
<p class="copyright">Copyright &#169; DAISY Consortium 2022</p>
@@ -54,21 +59,20 @@ <h2>Introduction</h2>
5459

5560
<h2>Recommendations</h2>
5661

57-
<p>After thorough evaluation, we are able to propose two techniques at this point of time. These techniques worked in a majority of the reading environments. This does not guarantee full support, but these provide a way forward while the web browsers, EPUB reading systems and assistive technologies catch-up.</p>
62+
<p>After thorough evaluation, we are able to propose two techniques at this point of time. These techniques worked in a majority of the reading environments. This does not guarantee full support, but these provide a way forward while the web browsers, EPUB reading systems and assistive technologies catch up.</p>
5863

5964
<section id="technique1">
6065
<h3>Recommended technique: Extended description in a separate HTML file with hyperlink</h3>
6166

62-
<p>This technique provides extended descriptions in separate HTML file(s) (e.g. and appendix at the end of the e-book, a file containing extended descriptions for each chapter of the publication or even a file for each image). A hyperlink placed below the image in the main content links to the description in the separate file. And a back link placed in the description returns the user to the original reading position in the main content.</p>
67+
<p>This technique provides extended descriptions in separate HTML file(s) (e.g. an appendix at the end of the e-book, a file containing extended descriptions for each chapter of the publication or even a file for each image). A hyperlink placed below the image in the main content links to the description in the separate file. And a back link placed in the description returns the user to the original reading position in the main content.</p>
6368

64-
<p class="note">This technique is recommended over the use of HTML <code>details</code> element (see <a href="#technique3">Deprecated technique</a>) as it provides better support across reading systems and reduces cognitive load for users.</p>
69+
<p class="note">This technique is recommended over the use of HTML <code>details</code> element (see <a href="#technique3">Deprecated technique</a>) as it provides better support across reading systems.</p>
6570

6671
<p>Advantages:</p>
6772
<ul>
6873
<li>Simple technique, authors and publishers are already familiar with it.</li>
69-
<li>Complexities and technical limitations in some EPUB reading systems due to collapsing and expanding are avoided, and fidelity of the page is maintained to a great extent.</li>
70-
<li>Almost all EPUB reading systems support hyperlinks.</li>
71-
<li>Including a copy of the original image marked as presentational (<code>role="presentation"</code>) can help cognitive users with understanding the extended description in context with the image.</li>
74+
<li>Well supported by EPUB reading systems, avoiding the technical limitations associated with collapsing and expanding elements.</li>
75+
<li>Including a copy of the original image marked as presentational (<code>role="presentation"</code>) can help users with understanding the extended description in context with the image.</li>
7276
<li>Multiple extended descriptions can be placed in the same HTML file, organized with <code>section</code> elements.</li>
7377
<li>The extended description file can be excluded from the reading order by setting <code>linear="no"</code> in the EPUB spine.</li>
7478
</ul>
@@ -77,7 +81,6 @@ <h3>Recommended technique: Extended description in a separate HTML file with hyp
7781
<ul>
7882
<li>Results in branching from the reading flow and sometimes the reading position may be lost when returning.</li>
7983
<li>Accuracy of linking back to original reading position matters, and some reading systems may fail to provide this accuracy.</li>
80-
<li>The navigation process (clicking the link, reading the description, then clicking the back link to return) may increase cognitive load for some users.</li>
8184
</ul>
8285

8386
<section id="technique1-main-content">
@@ -226,10 +229,13 @@ <h4>Setting up the external file with extended descriptions</h4>
226229
<li>Include a heading that describes the content</li>
227230
<li>Include a copy of the image marked as presentational (<code>role="presentation"</code> and <code>alt=""</code>) to prevent screen readers from announcing it twice, but for for visual reference</li>
228231
<li>Contain the detailed description</li>
229-
<li>Include a back link with <code>role="doc-backlink"</code> to return to the original image</li>
232+
<li>Include a backlink with <code>role="doc-backlink"</code> that returns to the anchor of the link to the extended description.</li>
233+
<li>The backlink text must clearly identify which image the user is returning to, especially when the file contains multiple extended descriptions.</li>
230234
</ul>
231235
<p class="note">To avoid external files with many extended descriptions becoming too large and creating long load times, multiple files can be used (for example, one per chapter of the publication). These files must be identified in the spine as described below.</p>
232236

237+
<p class="note">When a file contains many extended descriptions – for example in an end-of-book appendix – consider using one file per extended description, each with a single back link. This removes ambiguity: with only one back link in the file, the user cannot accidentally navigate to the wrong location in the main content. While this results in more files to manage, it provides the clearest and safest navigation experience.</p>
238+
233239
<h5>EPUB spine configuration</h5>
234240

235241
<p>The extended description file can be marked as <code>linear="no"</code> in the EPUB <code>spine</code> (inside the OPF file) to exclude it from the normal reading order.</p>
@@ -275,7 +281,7 @@ <h5 id="technique1-external-file-example">Example</h5>
275281
&lt;h3&gt;Presentation&lt;/h3&gt;
276282
&lt;p&gt;The bar chart represents both the number of visitors...&lt;/p&gt;
277283

278-
&lt;p&gt;&lt;a role="doc-backlink" href="chapter01.xhtml#img1"&gt;Navigate back to bar chart image&lt;/a&gt;.&lt;/p&gt;
284+
&lt;p&gt;&lt;a role="doc-backlink" href="chapter01.xhtml#anchor-extended-description-img1"&gt;Navigate back to bar chart image&lt;/a&gt;.&lt;/p&gt;
279285
&lt;/section&gt;
280286

281287
&lt;section id="extended-description-img2"&gt;
@@ -289,7 +295,7 @@ <h5 id="technique1-external-file-example">Example</h5>
289295
&lt;!-- more list items --&gt;
290296
&lt;/ol&gt;
291297

292-
&lt;p&gt;&lt;a role="doc-backlink" href="chapter01.xhtml#img2"&gt;Navigate back to heart and lung diagram&lt;/a&gt;.&lt;/p&gt;
298+
&lt;p&gt;&lt;a role="doc-backlink" href="chapter01.xhtml#anchor-extended-description-img2"&gt;Navigate back to heart and lung diagram&lt;/a&gt;.&lt;/p&gt;
293299
&lt;/section&gt;
294300
&lt;/body&gt;
295301
&lt;/html&gt;
@@ -348,6 +354,8 @@ <h4>Setting up the main content with extended description</h4>
348354
</pre>
349355
</aside>
350356

357+
<p class="note">The heading levels used inside the <code>aside</code> element should follow the surrounding document structure. They should be one level below the last heading used before the <code>aside</code>.</p>
358+
351359
<h5 id="technique2-examples">Example</h5>
352360

353361
<aside class="example" title="Extended description below the image in an aside element">
@@ -356,12 +364,12 @@ <h5 id="technique2-examples">Example</h5>
356364
&lt;h3&gt;Chart 1&lt;/h3&gt;
357365
&lt;img src="chart-ebcaadfb.png" alt="Bar chart showing monthly and total visitors for the first quarter 2014 for sites 1 to 3." aria-details="image1-extended-desc" /&gt;
358366
&lt;aside id="image1-extended-desc"&gt;
359-
&lt;h5&gt;Overview&lt;/h5&gt;
367+
&lt;h4&gt;Overview&lt;/h4&gt;
360368
&lt;p&gt;The chart shows the website hits for the first quarter of 2014. It shows that Site 1 has more visitors
361369
than either of the other sites, but the number of visitors is decreasing. Site 2 has a fairly constant
362370
number of visitors, while for Site 3 page hits are increasing month on month.&lt;/p&gt;
363-
364-
&lt;h6&gt;Data&lt;/h6&gt;
371+
372+
&lt;h4&gt;Data&lt;/h4&gt;
365373
&lt;table&gt;
366374
&lt;tr&gt;
367375
&lt;th scope="col"&gt;Period&lt;/th&gt;
@@ -395,7 +403,7 @@ <h5 id="technique2-examples">Example</h5>
395403
&lt;/tr&gt;
396404
&lt;/table&gt;
397405

398-
&lt;h6&gt;Presentation&lt;/h6&gt;
406+
&lt;h4&gt;Presentation&lt;/h4&gt;
399407
&lt;p&gt;The bar chart represents both the number of visitors per month for each website, and the total number
400408
of visitors per website for the entire quarter. Website visitors for each month are represented using
401409
columns lined up horizontally, with heights indicating the number of visitors. A fourth column is
@@ -404,7 +412,7 @@ <h5 id="technique2-examples">Example</h5>
404412
</pre>
405413
</aside>
406414

407-
<p class="note">The code patterns shown in the <a href="#technique1-main-content-examples">Recommended technique examples</a> (such as images in figure with link in figcaption, multiple images, using an icon) can also be applied to this technique by replacing the link element with the <code>aside</code> element containing the extended description.</p>
415+
<p class="note">Code patterns from the <a href="#technique1-main-content-examples">Recommended technique examples</a> can also be applied to this technique by replacing the link element with the <code>aside</code> element. However, when images are wrapped in a <code>figure</code> element, the <code>aside</code> cannot be placed inside the <code>figure</code> (as it would conflict with the required placement of <code>figcaption</code>); in this case, the <code>aside</code> should be placed immediately after the closing <code>figure</code> tag.</p>
408416

409417

410418
</section>
@@ -424,7 +432,7 @@ <h3>Deprecated technique: Extended description in a details element below the im
424432

425433
<p>Disadvantages:</p>
426434
<ul>
427-
<li>If a publication has a large number of images and extended descriptions, the task of locating the details, and expanding it to read descriptions puts considerable cognitive load, especially on the people with cognitive disabilities.</li>
435+
<li>If a publication has a large number of images and extended descriptions, the task of locating and expanding each details element to read the description may be cumbersome.</li>
428436
<li>There are EPUB reading systems which do not support HTML details properly, or the expansion of the element may cause pagination issues.</li>
429437
<li>This is one of the rare cases in which the content creator of the EPUB attempts to force a particular user experience (show/hide content); the world of EPUBs is normally declarative, identifying semantic structures and leaving it up to reading solutions to interpret them and show the user the best interface (think of footnotes managed in pop-ups or similar).</li>
430438
<li>If the extended description inside the details element is huge, expanding it may disorient the user, especially when the reading system has paginated view.</li>

0 commit comments

Comments
 (0)