From b05c380f6ff4375cbc27955653fd31310ff2f94d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 5 Oct 2022 11:57:23 -0700 Subject: [PATCH] HTML writer: replace deprecated aria roles for bibliography entries. `doc-biblioentry` -> `listitem` `doc-bibliography` -> `list` Closes #8354. --- src/Text/Pandoc/Writers/HTML.hs | 4 ++-- test/command/8354.md | 38 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 test/command/8354.md diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index ce67dd31a..eab583585 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -881,8 +881,8 @@ blockToHtmlInner opts (Div attr@(ident, classes, kvs') bs) = do , k /= "width" || "column" `notElem` classes] ++ [("style", "width:" <> w <> ";") | "column" `elem` classes , ("width", w) <- kvs'] ++ - [("role", "doc-bibliography") | isCslBibBody && html5] ++ - [("role", "doc-biblioentry") | isCslBibEntry && html5] + [("role", "list") | isCslBibBody && html5] ++ + [("role", "listitem") | isCslBibEntry && html5] let speakerNotes = "notes" `elem` classes -- we don't want incremental output inside speaker notes, see #1394 let opts' = if | speakerNotes -> opts{ writerIncremental = False } diff --git a/test/command/8354.md b/test/command/8354.md new file mode 100644 index 000000000..96e3d6801 --- /dev/null +++ b/test/command/8354.md @@ -0,0 +1,38 @@ +``` +% pandoc -f markdown -t html --citeproc +--- +title: test +nocite: '[@*]' +references: +- author: + - family: Fekete + given: Jean-Daniel + - family: Freire + given: Juliana + DOI: 10.1109/MCG.2020.3006412 + id: feketeExploringReproducibilityVisualization2020 + ISSN: 1558-1756 + issue: 5 + issued: 2020-09 + page: 108-119 + source: IEEE Xplore + title: Exploring Reproducibility in Visualization + container-title: IEEE Computer Graphics and Applications + type: article-journal + volume: 40 +--- + +## References +^D +

References

+
+
+Fekete, Jean-Daniel, and Juliana Freire. 2020. “Exploring +Reproducibility in Visualization.” IEEE Computer Graphics and +Applications 40 (5): 108–19. https://doi.org/10.1109/MCG.2020.3006412. +
+
+```