@@ -731,7 +731,10 @@ blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
731731 slideVariant <- gets stSlideVariant
732732 let kvs = [(k,v) | (k,v) <- kvs', k /= "width"] ++
733733 [("style", "width:" ++ w ++ ";")
734− | ("width",w) <- kvs', "column" `elem` classes]
734+ | ("width",w) <- kvs', "column" `elem` classes] ++
735+ [("role", "doc-bibliography") | ident == "refs" && html5] ++
736+ [("role", "doc-biblioentry")
737+ | "ref-item" `isPrefixOf` ident && html5]
735738 let speakerNotes = "notes" `elem` classes
736739 -- we don't want incremental output inside speaker notes, see #1394
737740 let opts' = if | speakerNotes -> opts{ writerIncremental = False }
@@ -1188,13 +1191,18 @@ inlineToHtml opts inline = do
11881191 _ | html5 -> link ! H5.customAttribute
11891192 "role" "doc-noteref"
11901193 _ -> link
1191− (Cite cits il)-> do contents <- inlineListToHtml opts il
1194+ (Cite cits il)-> do contents <- inlineListToHtml opts (walk addRoleToLink il)
11921195 let citationIds = unwords $ map citationId cits
11931196 let result = H.span ! A.class_ "citation" $ contents
11941197 return $ if html5
11951198 then result ! customAttribute "data-cites" (toValue citationIds)
11961199 else result
11971200
1201+addRoleToLink :: Inline -> Inline
1202+addRoleToLink (Link (id',classes,kvs) ils (src,tit)) =
1203+ Link (id',classes,("role","doc-biblioref"):kvs) ils (src,tit)
1204+addRoleToLink x = x
1205+
11981206blockListToNote :: PandocMonad m
11991207 => WriterOptions -> String -> [Block]
12001208 -> StateT WriterState m Html