Skip to content

Feature wish: support alt-text for accessibility #93

Description

@xavierleroy

Under pressure from publishers who need to meet accessibility requirements, LaTeX is getting some support for adding alt-text to images and other graphical elements:

  • the alt={...} parameter to the \includegraphics command;
  • a \Description macro that can be used along \caption in figures. (Not in standard LaTeX yet, but in the ACM class files at least.)

For example:

\documentclass[11pt]{article}
\usepackage{graphicx}

\begin{document}
\includegraphics[alt={A picture of a cat},width=10cm]{cat.jpg}
\begin{figure}
\includegraphics[width=10cm]{cat.jpg}
\caption{The ruler of the Internet}
\Description[Cat photo]{Photograph of a cat sleeping on a sofa.}
\end{figure}
\end{document}

Could we have some support for alt-text in Hevea? I'm thinking of the alt parameter to includegraphics, and perhaps an option to the image environment:

\begin{image}[alt={Schematic of a 4-bit adder}]
...
\end{image}

Activity

  1. changed the title [-]Support alt-text for accessibility[/-] [+]Feature wish: support alt-text for accessibility[/+] on May 25, 2026
  2. xavierleroy commented on May 25, 2026

    @xavierleroy
    ContributorAuthor

    Ping?

  3. maranget commented on May 26, 2026

    @maranget
    Owner

    Pong! The \imageflush command already takes an optional argument. Attributes to the resulting IMG element can be given by this optional argument. I am not sure I understand your example, as there is no default "image" environment, but a "toimage" environment. In any case, you can try:

    \begin{toimage}
    ...
    \end{toimage}
    \imageflush[alt="Schematic of a 4-bit adder"]
    
  4. maranget commented on May 26, 2026

    @maranget
    Owner

    Having hevea to use the alt key of \includegraphics to generate alt text is more involved.

  5. xavierleroy commented on May 31, 2026

    @xavierleroy
    ContributorAuthor

    OK for using optional argument to \imageflush. I use the toimage environment wrapped in a custom environment of mine, so I could put the optional argument on the environment itself.

    \includegraphics support for alt-text would be nice, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions