I've created figures using R and mermaid. The outcomes for the figures differs and I suspect neither meets WCAG.

Both code blocks use label, fig-cap, and fig-alt.


The R graph does get an alt tag, created using #| fig-alt: ...
It is read aloud by my screen reader when I get to the graphic's placement in the text.
However, the caption is not read aloud by either  screen reader I've tried.Initially, I thought it was because the caption is being embedded int he image file, but upon inspection of the png in the figures subfolder, the image does not include the caption.

WRT the mermaid flow chart: I do not get a caption with the same findings as for the R graph. I do not though even get told the graphic exists in my html page by the screen readers nor is the alt tag text read aloud. I have tried using hte default presentation of the mermaid graph, as well as explicitly choosing to create png and svg; the outcomes remain the same.

I've really appreciated the inclusion of fig.alt in knitr, as an opportunity to get more information than can be imparted in a figure's caption.

How can I get the captions included as regular text as was the norm with rmarkdown::render()?

Is there a switch to add to the main YAML? If so, I haven't found it documented. If not, can I request that one be created.
Thanks,
Jonathan

2022-07-08T07:25:30Z
ajrgodfrey
Future
open
quarto embeds captions in figures
https://github.com/quarto-dev/quarto-cli/issues/1346