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 when embed-resources: false, <img> will be used.
Since svg is embedded via
tag, there is no way to access the svg DOM tree within the generated html output. In order to let assistive technology agents, such as screen readers, interact with the svg, we may want to take different approaches.
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
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