Is there really no way of providing alternate texts (as read by e.g. Acrobat or PowerPDF) for figures in Latex as of today

accessibility

I have searched through various threads orbiting questions of accessibility in Latex. I am not interested in the full glory of a fully structured/tagged document, the only thing that I need to do is to augment figures (and maybe later tables/equations) with alternate texts such that they can be read and modified by Adobe or other PDF viewers.
My understanding is that the accessibility package could in principle do this, however it suffers from issues, like not supporting the fancyhdr which is a requirement for me. In a minimum example I set up (see below), that package creates text, but no alternate texts.

I have tried both accsupp and tagpdf, I also tried pdfcomment – none of them yield a PDF with the alternate texts readable with Adobe. The furthest I got with accsupp, as the reader seems to detect there is some alternate text provided, it just does not show it.

Are there any other solutions I have not looked at? Is there any post-processing hack or something like that? I am a little surprised, because even Word exports PDFs with alternate texts showing up. Adding the alternate texts manually in Acrobat is not an option, as the documents will be changed/compiled frequently.

UPDATE:

Here is an uncompressed PDF with a tag that Acrobat recognizes. The title of the image is "This is the title" and the description (alt text) reads "This is the description":

https://wetransfer.com/downloads/69b4ee447b173ce19e15fa13a03d930220210917073415/113847b5fb92830bf9b4c0c32f6a149320210917073501/ea8762

\documentclass [a4paper,parskip,11pt]{scrreprt}
\usepackage[tagged]{accessibility}
\usepackage{graphicx}

\usepackage{xcolor}
\begin{document}
\newcommand{\gray}[1]{{\color{gray}#1}}


\begin{figure}
    \centering
    \includegraphics[width=0.6\textwidth]{grafik}
    \alt{hello}
    \caption{caption}
    \label{fig:1}

\end{figure}

\end{document}

Some threads I checked:
Need alt text for images in pdf for screen readers

What is the best package for accessibility tagging?

LaTeX accessibility

Best Answer

Your document is a fully tagged pdf. You can get something similar like this (this assumes a current latex):

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{testphase=tagpdf,activate=tagging,uncompress}
\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}

\tagpdfparaOff

\tagstructbegin{tag=Figure,alttext=This is a description}\tagmcbegin{tag=Figure}
\includegraphics{example-image.png}
\tagmcend\tagstructend

\tagpdfparaOn


\end{document}

I can't show a screenshot, the tool tip doesn't show up, but i can assure you that the tool tip with the alternative text is there.

enter image description here

Related Question