Insert SVG file as <object>
instead of <img>
in HTML (better for accessibility)
#6581
Labels
Milestone
<object>
instead of <img>
in HTML (better for accessibility)
#6581
This is possible in knitr following discussion at yihui/knitr#2152 by opting in using option
options(knitr.svg.object = TRUE)
. Unfortunately, this does not work in Quarto because we don't use knitr plot hooks.This is important for accessibility as explained by @jooyoungseo at yihui/knitr#2152 (comment).
When
embed-resources: true
,<svg>
will be included but whenembed-resources: false
,<img>
will be used.This treatment for SVG file was discussed in Pandoc at
but solution recommended there was too use a Lua filter to create the
<object>
when this is a svg file.I suggest we do the same in our Lua filter in Quarto.
cc @jooyoungseo
The text was updated successfully, but these errors were encountered: