HTML writer: Add 'footnotes' identifier to footnotes section.

Closes #8043.
This commit is contained in:
John MacFarlane 2022-04-26 13:01:02 -07:00
parent 8689d9c0d6
commit 50c9848c34
4 changed files with 8 additions and 5 deletions

View file

@ -542,9 +542,11 @@ footnoteSection refLocation startCounter notes = do
let container x
| html5
, epubVersion == Just EPUB3
= H5.section ! A.class_ className
= H5.section ! A.id "footnotes"
! A.class_ className
! customAttribute "epub:type" "footnotes" $ x
| html5 = H5.section ! A.class_ className
| html5 = H5.section ! A.id "footnotes"
! A.class_ className
! customAttribute "role" "doc-endnotes"
$ x
| slideVariant /= NoSlides = H.div ! A.class_ "footnotes slide" $ x

View file

@ -4,7 +4,7 @@ This.^[Has a footnote.]
^D
<p>This.<a href="#foofn1" class="footnote-ref" id="foofnref1"
role="doc-noteref"><sup>1</sup></a></p>
<section class="footnotes footnotes-end-of-document"
<section id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>

View file

@ -8,7 +8,7 @@ Test.[^fn]
^D
<p>Test.<a href="#fn1" class="footnote-ref" id="fnref1"
role="doc-noteref"><sup>1</sup></a></p>
<section class="footnotes footnotes-end-of-document"
<section id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>

View file

@ -727,7 +727,8 @@ role="doc-noteref"><sup>4</sup></a></p>
role="doc-noteref"><sup>5</sup></a></li>
</ol>
<p>This paragraph should not be part of the note, as it is not indented.</p>
<section class="footnotes footnotes-end-of-document" role="doc-endnotes">
<section id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote