quarto-dev / quarto-dev/quarto-cli

fig-alt doesn't propogate to LaTeX non-float images

Open
#14,315 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility bug figures
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I have:
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

When rendering to .pdf with pdf-standard: ua-2, the alt-text is not included in the .tex file, whereas when rendering to .html, it is included.

Steps to reproduce
---
title: "accessibility test"
format:
  pdf:
    keep-tex: true
    pdf-standard: ua-2
    lang: en
  html:
    embed-resources: true
    html-math-method:
      method: mathjax
      url: "https://cdn.jsdelivr.net/npm/mathjax@4.1/tex-mml-chtml.js"
---

A plot of $X$ vs. $X^2$:

```{r}
#| fig-alt: "scatterplot of X vs. X^2"
#| echo: false
#| warning: false

library(ggplot2)

X <- rnorm(5)
ggplot(NULL, aes(x=X, y=X^2)) + geom_point()
```
Actual behavior

The relevant line in the .tex file:

\pandocbounded{\includegraphics[keepaspectratio]{test_files/figure-pdf/unnamed-chunk-1-1.pdf}}

The relevant lines in the .html file (image id edited):

<figure class="figure">
<p><img role="img" aria-label="scatterplot of X vs. X^2" src="data:image/png;base64,..." class="img-fluid figure-img" alt="scatterplot of X vs. X^2" width="672"></p>
</figure>

Expected behavior

The .tex should read:

\pandocbounded{\includegraphics[alt={scatterplot of X vs. X^2}, keepaspectratio]{test_files/figure-pdf/unnamed-chunk-1-1.pdf}}
Your environment

IDE: RStudio 2026.01.1+403
OS: Windows 11 Pro 24H2

Quarto check output
C:\Users>quarto check
Quarto 1.9.36
[>] Checking environment information...
      Quarto cache location: C:\Users\***\***\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.8.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.4.5: OK
      Typst version 0.14.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.9.36
      Path: C:\Program Files\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2026.03.02
      Chromium: (not installed)
      Chrome Headless Shell: (not installed)
      VeraPDF: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\***\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2026

[>] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: C:\Program Files\Google\Chrome\Application\chrome.exe
      Source: Windows Registry

[>] Checking basic markdown render....OK

[>] Checking R installation...........OK
      Version: 4.4.3
      Path: C:/PROGRA~1/R/R-44~1.3
      LibPaths:
        - C:/R/Library
        - C:/Program Files/R/R-4.4.3/library
      knitr: 1.51
      rmarkdown: 2.27

[>] Checking Knitr engine render......OK

[>] Checking Python 3 installation....OK
      Version: 3.10.6
      Path: C:/Users/***/AppData/Local/Programs/Python/Python310/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with py -m pip install jupyter

[>] Checking Julia installation...

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.

Research direction

Use the supplied Quarto document with the R figure as the reproduction entry point, then compare the generated .tex and HTML outputs under pdf-standard: ua-2. Trace the non-float image rendering path and verify that the completed .tex includes the figure's alt text while HTML behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, latex, r
Domain
accessibility, build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.