Skip to content

Alt-text for images is not embedded in PDF output for accessibility #13248

@sbwiecko

Description

@sbwiecko

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

Hello Quarto Team,

I've encountered an issue where alternative text (alt-text) for images is not being included in the final PDF output. This makes the resulting documents inaccessible to users who rely on screen readers.

The problem occurs for both figures generated from code chunks (e.g., Python) and for images included directly with Markdown syntax. I have confirmed that the alt-text is correctly rendered when exporting to HTML and EPUB formats, so the issue appears to be specific to the PDF rendering pipeline.

I have searched the existing issues on the repository and found several that deal with alt-text problems, but they seem to primarily focus on the DOCX format, for example:

Minimal reproducible example

---
title: "Accessibility Test"
format:
  pdf:
    papersize: a4
---

This is a test to see if PDF tagging works.

```{python}
#| label: fig-testplot
#| fig-cap: "A simple test plot."
#| fig-alt: "This is the alternative text for the simple test plot that a screen reader should find."

import matplotlib.pyplot as plt

plt.plot([0, 1, 2], [2, 1, 3])
plt.title("Test Plot")
plt.show()
```

![A test image with alt-text](https://upload.wikimedia.org/wikipedia/commons/d/dd/Gray_book.png){fig-alt="A figure alt-text example."}

Actual behavior

The images in the generated PDF have no associated alternative text. The accessibility checker in Adobe Acrobat reports that the PDF file isn't tagged

Screenshot of the PDF accessibility check showing "PDF balisé (tagged PDF in English): Non (No)"

Image

Expected behavior

The PDF's accessibility tree should contain tags for both images, and these tags should include the alt-text specified in the .qmd file. A screen reader should announce the alt-text when it encounters the images.

Your environment

  • VSCode v1.103.1
  • Windows 11 (25H2)
  • One MiKTeX Utility 1.11 (MiKTeX 25.4)

Quarto check output

Quarto 1.7.33
[>] Checking environment information...
      Quarto cache location: C:\Users\Sébastien\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.85.1: OK
      Deno version 1.46.3: OK
      Typst version 0.13.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.7.33
      Path: C:\Program Files\Quarto\bin
      CodePage: 65001

[>] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Tex:  (not detected)

[>] 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 Python 3 installation....OK
      Version: 3.12.10
      Path: C:/Users/Sébastien/Documents/.env/Scripts/python.exe
      Jupyter: 5.7.2
      Kernels: python3, ir, ir4.4, julia-1.7

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

[>] Checking R installation...........OK
      Version: 4.5.1
      Path: C:/PROGRA~1/R/R-45~1.1
      LibPaths:
        - C:/Program Files/R/R-4.5.1/library
      knitr: 1.50
      rmarkdown: 2.29

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

Thank you for your work on Quarto and for looking into this important accessibility feature.

Metadata

Metadata

Assignees

Labels

accessibilitybugSomething isn't workinglatexLaTeX engines related libraries and technologies

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions