Set Document Properties
Set document properties with \hypersetup{
\hypersetup{
pdftitle={Accessibility Recommendations for LaTeX Documents},
pdfauthor={eSAIL @ TAMU - Accessibility Team},
pdfsubject={Accessible LaTeX Recommendations (PDF/UA-2)},
pdfkeywords={LaTeX, accessibility, PDF/UA-2, NVDA, MathML},
pdfdisplaydoctitle=true
}
OR
Update \hypersetup
Add two keys:
\hypersetup{
pdflang = {en-US},
pdfdisplaydoctitle = true,
% ... your existing keys ...
}
pdfdisplaydoctitle=true satisfies §7.1 of the standard, which requires PDF viewers to display the document title (from pdftitle) rather than the filename.
Example:
● \hypersetup{
pdftitle = {Operating Systems: Three Easy Pieces},
pdfauthor = {Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau},
pdfsubject = {Operating Systems},
pdfkeywords = {operating systems, virtualization, concurrency, persistence},
pdfencoding = auto,
pdflang = {en-US},
pdfdisplaydoctitle = true,
colorlinks = true,
linkcolor = blue,
urlcolor = blue,
bookmarksnumbered = true,
}
Set Document Elements
You must manually ensure the following elements are properly formatted if present in your document.
Headers
Ensure your document is organized into headers and subheaders using \section{ } (this will be read as Header 1) and \subsection{ } (read as Header 2). Each section should have a corresponding title defined and should not be left blank.
Floating Elements
Floating elements such as images and tables create problems with the reading order of the PDF, because the element may “float” to the bottom of the tag tree, or get mixed in with other content. To remedy this:
- Load the float package and use `[H]` to ensure the element is read in the correct order in the document. This may interfere with the visual formatting, but it is essential to ensure the content is presented to assistive technology users in logical order.
- Manually wrap a tag container around the floating element
- Place `\tagstructbegin{tag=Part}` immediately before your floating element. Ensure there is a blank line immediately prior to this command to avoid tagpdf structure errors. Place `\tagstructend` immediately following the floating element to close the section.
- Only the element and its caption should be inside this structure. See graphics and table examples below for examples.
Math
- Inline Math: For inline math (equations shown within a sentence) it is recommended to use the standard
$ $ delimiters to define a math expression.Example: Define the loop gain $L(s)=G(s) G_{c}(s)$.
- Display Math: For an equation in displayed math mode (equations on their own line), you should use `\[ \]`.Example: \[T(s)=\frac{Y(s)}{R(s)} \]
- Align and cases environments can also be used.
Tables
- Table headers. Currently table headers are defined by `table/header-rows=1` in the `\documentmetadata` command.
- To ensure your table and caption read in the correct order, you should use `[H]` and wrap the element with a manual tag structure See floating elements, above, for full information.
%leave an empty line before \tagstructbegin
\tagstructbegin{tag=Part}%required to ensure correct reading order of contents if the table has any caption
\begin{table}[H]
\caption{Sample Table}%caption must be first or last element of environment
\centering
\begin{tabularx}{\linewidth}{|X|X|}
\hline
\textbf{Category 1} & \textbf{Category 2} \\ \hline
First block of information & Second block of information \\ \hline
More information & Other information \\ \hline
\end{tabularx}
\end{table}
\tagstructend
Graphics and Alt Text
Images must include alt text (alternative text describing the content of the image) to ensure accessibility for screen readers. The `graphicx` package allows you to easily add alt text using the `\includegraphics` command. Within the `\includegraphics` command, specify your main parameters and then insert a comma and add: `alt={your descriptive text here}`.
Here is an example of alt text use:
\includegraphics[width=.75\textwidth,alt={SVM classifier showing the maximum margin hyperplane and support
vectors separating two classes}]{Images/img1.png}
If your image is decorative and you wish to exclude it from tags, you can use the word `artifact` within the include graphics commands.
Here is an example:
\includegraphics[width=.75\textwidth,artifact]{Images/img1.png}
If your graphic has a caption, you must add a manual section break around the graphic to ensure the correct reading order. See floating elements, above, for full information.
The full graphics command with alt text should now look like the following:
%leave an empty line before \tagstructbegin
\tagstructbegin{tag=Sect}%required to ensure correct reading order of contents if the table has any caption
\begin{figure}[H]
\centering
\includegraphics[width=.75\textwidth,alt={Unity Feedback Configuration for Error Signal Analysis}]{Images/img1.png}
\caption{Unity Feedback Configuration for Error Signal Analysis}
\end{figure}
\tagstructend
Another example:
Every \includegraphics must carry a text description. Load pdfcomment and wrap each image:
\usepackage{pdfcomment}
Then, because \pdftooltip from pdfcomment normally creates a button widget annotation (which fails §7.18.4), redefine it after all packages load to emit a proper Figure structure element instead:
\AtBeginDocument{%
\renewcommand{\pdftooltip}[2]{%
\begingroup
\def\@tagpdf@alttext{#2}%
\tagstructbegin{tag=Figure,alttext=\@tagpdf@alttext}%
\tagmcbegin{tag=Figure}%
#1%
\tagmcend
\tagstructend
\endgroup
}%
}
The \def\@tagpdf@alttext{#2} indirection is required: if alt text contains a comma, passing it directly to alttext={#2} causes the l3keys parser to split on the comma and error. The macro is expanded as a single token, bypassing that parser.
Wrap each image at the point of use:
\pdftooltip{%
\includegraphics[width=\textwidth]{figure.pdf}%
}{A diagram showing the three-process timeline from fork to exec to exit.}
Note: the alt={...} option on \includegraphics itself does not write to the PDF structure tree in current TeX Live — only the \pdftooltip wrapper above does.
Validation and Accessibility Scoring
PDF Validation
Most PDF checkers (Adobe Acrobat, PAC, Canvas Ally) do not yet fully recognize MathML content tags and may flag them as errors.
PDF Limitations and Requirements
This method was tested using Foxit PDF reader and Adobe Acrobat. Other PDF readers may not be able to interface with math content and/or screen readers to output accessible content.
Screen Reader Limitations and Requirements
This method was tested with NVDA screen reader with the Mathcat addon which allows the screen reader to announce MathML content within a PDF document. While Jaws can read math in HTML format and Word documents, it cannot yet read MathML content in PDF files.
A fully compliant document reports all assertions passed and zero failures. The 1b flavour selects the PDF/UA-1 machine-readable rules profile.
Here is a minimal example of making a PDF/UA-1 compliant file using lualatex
YouTube Videos on LaTeX Accessibility
References:
Dr. Stephen A. Torri, Associate Teaching Professor, Mississippi State University
Mary Lyn and Niles Moseley Endowed Chair in Cybersecurity
E: storri@cse.msstate.edu
https://esail.tamu.edu/faculty-tutorials/accessible-latex-pdf-ua-2-overleaf-2025/
https://www.youtube.com/watch?v=BnQltcExOVc
https://www.youtube.com/watch?v=qCLYv3Tdg9I
https://www.youtube.com/watch?v=oCTsAqZqm9A