HTML writer: do not include the deprecated doc-endnote role.

doc-endnote was deprecated in DPUB-ARIA 1.1.
Closes #8030.
This commit is contained in:
John MacFarlane 2022-04-21 08:07:37 -07:00
parent f3cfeba3ef
commit f9b2ca7465
4 changed files with 14 additions and 19 deletions

View file

@ -1642,8 +1642,6 @@ blockListToNote opts ref blocks = do
let noteItem' = case epubVersion of
Just EPUB3 -> noteItem !
customAttribute "epub:type" "footnote"
_ | html5 -> noteItem !
customAttribute "role" "doc-endnote"
_ -> noteItem
return $ nl >> noteItem'

View file

@ -8,9 +8,8 @@ role="doc-noteref"><sup>1</sup></a></p>
role="doc-endnotes">
<hr />
<ol>
<li id="foofn1" role="doc-endnote"><p>Has a footnote.<a
href="#foofnref1" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="foofn1"><p>Has a footnote.<a href="#foofnref1"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
```

View file

@ -12,7 +12,7 @@ role="doc-noteref"><sup>1</sup></a></p>
role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p>Foo:</p>
<li id="fn1"><p>Foo:</p>
<figure>
<img src="/image.jpg" alt="Caption." />
<figcaption aria-hidden="true">Caption.</figcaption>

View file

@ -730,26 +730,24 @@ role="doc-noteref"><sup>5</sup></a></li>
<section class="footnotes footnotes-end-of-document" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p>Here is the footnote. It can go anywhere
after the footnote reference. It need not be placed at the end of the
document.<a href="#fnref1" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p>Heres the long note. This one contains
multiple blocks.</p>
<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote
reference. It need not be placed at the end of the document.<a href="#fnref1"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2"><p>Heres the long note. This one contains multiple blocks.</p>
<p>Subsequent blocks are indented to show that they belong to the footnote (as
with list items).</p>
<pre><code> { &lt;code&gt; }</code></pre>
<p>If you want, you can indent every line, but you can also be lazy and just
indent the first line of each block.<a href="#fnref2" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p>This is <em>easier</em> to type. Inline notes
may contain <a href="http://google.com">links</a> and <code>]</code> verbatim
characters, as well as [bracketed text].<a href="#fnref3" class="footnote-back"
<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a
href="http://google.com">links</a> and <code>]</code> verbatim characters, as
well as [bracketed text].<a href="#fnref3" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn4"><p>In quote.<a href="#fnref4" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn5"><p>In list.<a href="#fnref5" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p>In quote.<a href="#fnref4"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn5" role="doc-endnote"><p>In list.<a href="#fnref5"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
</body>