_Edited: based on @cderv comment and with additional examples_

## Considering the below example for Quarto `fig-alt` attribute:

```md
## Section

![Caption for Quarto Logo](https://quarto.org/quarto.png){fig-alt="Quarto Logo"}
```

|`quarto pandoc index.qmd --from markdown --to docx -o index.docx` | `quarto render index.qmd --to docx`|
|:-:|:-:|
| <img width="1624" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/8896044/5fea046c-6e6f-43b7-9033-faf69d0bbca0"> | <img width="1624" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/8896044/b78b2635-e82b-4b0e-a887-0a95272233cc"> |

## Using Pandoc markup, caption + alt text ends up in Word alt text (so no real issues):

```md
## Section

![Caption for Quarto Logo](https://quarto.org/quarto.png "Quarto Logo")
```

|`quarto pandoc index.qmd --from markdown --to docx -o index.docx` | `quarto render index.qmd --to docx`|
|:-:|:-:|
| <img width="1624" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/8896044/c6869aa3-a8d0-4c9d-ab45-b790434323e9"> | <img width="1624" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/8896044/fbffb4be-c25d-43d0-b08a-0834da27cc03"> |

## Using computations:

````md
## Section

```{r}
#| label: fig-plot
#| fig-cap: "A caption for a plot"
#| fig-alt: "An alt text for a plot"
plot(1)
```
````

|`quarto pandoc index.qmd --from markdown --to docx -o index.docx` | `quarto render index.qmd --to docx`|
|:-:|:-:|
| Obviously not working | <img width="1624" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/8896044/4f50db00-abbc-4dfc-8aa4-d09b4344cda6"> |

Note that computation with figures will generate the following markdown (for both `knitr`/`Jupyter`):

```md
![A caption for a plot](index_files/figure-docx/fig-plot-output-1.png){#fig-plot fig-alt='An alt text for a plot'}
```

---

The initial question also mentioned `pdf`, but I don't even know how to show alternative text in PDF.

---

### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/5511

<div type='discussions-op-text'>

<sup>Originally posted by **IZE85** May 12, 2023</sup>
In MS Word, one is able to "add alternative text to a shape, picture, chart, SmartArt graphic, or other object to help people with visual disabilities."

When I add alternative text to a figure via "fig-alt" it gets exported via HTML. Unfortunately, when knitting to formats like Word or PDF, my fig-alt text is saved/deposited somewhere, if I'm correct. At least, for MS Word, I cannot see the alternative text in the "alternative text" field, MS Word provides for figures.

My question: Is it possible for the fig-alt text to find its way into the MS Word Alternative text field and have something similar for PDFs?

Thank you in advance!

Ad alternative text:
"Alt text helps people with visual disabilities understand pictures and other graphical content. When someone using a screen reader comes across a picture in a document, they will hear the alt text describing the picture; without alt text, they will only know they've reached a picture without knowing what the picture shows."
Source: https://support.microsoft.com/en-us/office/add-alternative-text-to-a-shape-picture-chart-smartart-graphic-or-other-object-44989b2a-903c-4d9a-b742-6a75b451c669</div>
cderv
2023-05-12T12:15:32Z
mcanouil
bug pandoc-lua docx figures
v1.4
open
`fig-alt` removed by Quarto at least for `docx` (works with Pandoc)
https://github.com/quarto-dev/quarto-cli/issues/5514