diff options
| author | John MacFarlane <[email protected]> | 2023-12-04 09:22:58 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-12-04 09:22:58 -0800 |
| commit | 41da8ad9e03b9f7c97a1c9745f06bdbc28acd21f (patch) | |
| tree | 13ed99584f2dc6b942973ec8d919628c97c8288b /src | |
| parent | dbdb4d9c1f16f57f4c66a84ed71b7837aeb69208 (diff) | |
HTML5 writer footnote changes (aria-role, element type).
* To conform to validator's expectations, `doc-footnote` role is used
with `aside` and `doc-endnotes` with `section`.
* `aside` is used only for notes at ends of sections or blocks;
if all the notes come at the end of the document, `section` is
used so we can have the `doc-endnotes` role.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 4c5a1d382..0f7bc85c8 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -544,14 +544,14 @@ footnoteSection opts refLocation startCounter notes = do ! customAttribute "epub:type" "footnotes" $ x | html5 , refLocation == EndOfDocument - , slideVariant == RevealJsSlides -- need a section for a new slide: + -- Note: we need a section for a new slide in slide formats. = H5.section ! A5.id "footnotes" ! A5.class_ className ! A5.role "doc-endnotes" $ x | html5 = H5.aside ! prefixedId opts "footnotes" ! A5.class_ className - ! A5.role "doc-endnotes" + ! A5.role "doc-footnote" $ x | slideVariant /= NoSlides = H.div ! A.class_ "footnotes slide" $ x | otherwise = H.div ! A.class_ className $ x |
