quarto-dev / quarto-dev/quarto-cli

[Accessibility] fig-alt does not work for mermaid

Open
#3,873 4 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.