quarto-dev / quarto-dev/quarto-cli
quarto embeds captions in figures
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported R and Mermaid figure cases using label, fig-cap, and fig-alt, then inspect the generated HTML and screen-reader behavior. Compare the caption and alternative-text output for each format; done means captions appear as regular text and both graphics expose their descriptive text accessibly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- accessibility
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100