Creating accessible LaTeX documents has historically been a challenge because PDFs are often "flat" files without the structural information screen readers need. However, with the release of TeX Live 2025 and the LaTeX Tagged PDF Project, it is now possible to generate "Tagged PDFs" (PDF/UA-2 compliant) that screen readers can navigate effectively.
This guide provides a step-by-step workflow based on the latest 2025/2026 standards.
Step 1: Environment Setup
To use the latest accessibility features, you must use a modern TeX distribution and specific compiler settings.
- Compiler: You must use LuaLaTeX. Older compilers like pdfLaTeX do not support full MathML tagging.
- Distribution: Ensure you are using TeX Live 2025 or newer.
- Overleaf Users: Go to Menu > Settings > Compiler and select LuaLaTeX. Set the TeX Live version to 2025.
Step 2: The Mandatory Metadata Header
The \DocumentMetadata command is the most critical step. It must appear before \documentclass. This command activates the tagging engine and sets the accessibility standard.
Code snippet
% This MUST be the first line of your file
\DocumentMetadata{
lang = en-US, % Set the document language
pdfstandard = ua-2, % Universal Accessibility standard
tagging = on, % Enable automatic tagging
tagging-setup = {
math/setup = {mathml-SE} % Enables MathML for screen readers
}
}
\documentclass{article}
\usepackage{unicode-math} % Required for accessible math fonts
Step 3: Use Semantic Document Structure
Screen readers rely on "Tags" to navigate. If you use visual formatting (like \textbf{\Large 1. Introduction}) instead of semantic commands, a screen reader won't know it’s a heading.
- Headings: Always use \section{}, \subsection{}, etc.
- Lists: Use \begin{itemize} or \begin{enumerate}. Do not manually type numbers or bullets.
- Links: Use the hyperref package for clickable, labeled URLs.
Code snippet
\usepackage[hidelinks]{hyperref}
\hypersetup{pdftitle={Your Title}, pdfauthor={Your Name}}
Step 4: Adding Alt Text to Figures
Images are invisible to screen readers unless they have Alternative Text (Alt Text). The graphicx package in TeX Live 2025 supports an alt key directly.
For Informative Images:
Code snippet
\includegraphics[width=\textwidth, alt={Graph showing a linear increase in temperature from 1900 to 2020}]{climate_chart.png}
For Decorative Images: If an image is just for style, use the artifact key so the screen reader skips it:
Code snippet
\includegraphics[width=2cm, artifact]{divider_line.png}
Step 5: Accessible Mathematics
By using the mathml-SE setup in Step 2, LaTeX will automatically embed MathML (Mathematical Markup Language). This allows screen readers (like NVDA with the MathCAT add-on) to "read" the math (e.g., saying "fraction with numerator x and denominator y" instead of "x slash y").
- Inline Math: Use \( ... \) or $ ... $.
- Display Math: Use \[ ... \] or the equation environment.
- Avoid: Do not use $$...$$ (old TeX syntax) as it can interfere with modern tagging.
Step 6: Tables with Headers
Tables are often the hardest part for screen readers. You must identify which row is the "Header" so the reader can associate data cells with their categories.
In your \DocumentMetadata (from Step 2), ensure table/header-rows=1 is included if your tables consistently use the first row as a header.
Code snippet
\begin{tabular}{l c}
\hline
\textbf{Student} & \textbf{Grade} \\ % The reader recognizes these as headers
\hline
Alice & A \\
Bob & B \\
\hline
\end{tabular}
Step 7: Fix the Reading Order (Floating Elements)
In LaTeX, figures and tables "float" to find the best visual spot, which often breaks the logical reading order for a screen reader.
The Fix: Use the float package and the [H] (HERE) specifier to force the element to stay exactly where it is in the code.
Code snippet
\usepackage{float}
...
\begin{figure}[H]
\centering
\includegraphics[alt={...}]{image.png}
\caption{Description of image}
\end{figure}
Step 8: Validation
After compiling your PDF, you should verify its accessibility:
- PAC (PDF Accessibility Checker): A free tool to check for PDF/UA compliance.
- VeraPDF: Recommended for technical validation of the tag structure.
- Manual Check: Open the PDF with a screen reader like NVDA (Windows) or VoiceOver (Mac) to ensure the math and headings are announced correctly.