quarto-dev / quarto-dev/quarto-cli
[Accessibility] fig-alt does not work for mermaid
Open
@cscheid is already working on this.
Since Jan 6, 2023.
accessibility
bug
diagrams-mermaid
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Currently, fig-alt does not work for mermaid diagram. However, there seems a workaround. Mermaid has their own accessibility options.
@cscheid -- We may want to bind fig-cap to accTitle and fig-alt to accDescr. Other additional accessibility fixes that I am not mentioning here need to be taken care of on mermaid side.
Reprex
---
title: "Untitled"
format: html
---
# Mermaid Accessibility
## Inaccessible Version
```{mermaid}
%%| fig-alt: testing
flowchart LR
A[Hard edge] --> B(Round edge)
B --> C{Decision}
C --> D[Result one]
C --> E[Result two]
```
## Accessible Version
```{mermaid}
graph LR
accTitle: Big Decisions
accDescr: Bob's Burgers process for making big decisions
A[Identify Big Descision] --> B{Make Big Decision}
B --> D[Be done]
```
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.
Assessment
This issue has not been assessed yet.