A tagged PDF is a PDF with a structure tree: a hidden layer of tags that marks each heading, paragraph, list, table, figure and equation and sets the order a screen reader reads them in. To make one in LaTeX, put \DocumentMetadata with tagging = on before \documentclass and compile with LuaLaTeX in TeX Live 2025 or later.
On Overleaf that means changing two settings, and Word and Acrobat can also make tagged PDFs. A tag tree only helps if it is right, so check the result in each case.
What a tagged PDF is
The tags are not visible on the page. W3C’s PDF techniques for WCAG describe Tagged PDF as a use of PDF’s logical structure: a structure tree that assistive technology walks through to present the content in its logical order, whatever the layout of the page. This is the tree LaTeX made for the test file further down:

Without tags, a screen reader has no headings to jump between, no table cells to move through and no alt text for figures. Tagged is also not the same as accessible: a file can have tags in the wrong order, figures without alt text or tables without header cells. PDF/UA (ISO 14289) is the standard that sets how the tags must be used.
How to check if a PDF is tagged
pdfinfo, from Poppler, prints a Tagged line. For our test file further down, and for the same file compiled without \DocumentMetadata:
$ pdfinfo tagged-lualatex.pdf | grep Tagged
Tagged: yes
$ pdfinfo untagged.pdf | grep Tagged
Tagged: noIn Acrobat, the tag tree is in the Accessibility tags panel: View, then Show/Hide, Side panels, Accessibility tags (on Windows, the View menu is under the menu icon). Our free PDF accessibility checker reports it as “PDF is tagged”, with checks for the title, language and alt text.
Tagged: yes only means a tag tree exists. To check that the tags are right, validate the file against PDF/UA with veraPDF or PAC and listen to it with a screen reader; see how to check PDF accessibility. Our tagged test file passed veraPDF’s PDF/UA-2 check, and the untagged copy failed seven rules, among them the missing structure tree.
How to make a tagged PDF in LaTeX
Put \DocumentMetadata before \documentclass, compile with LuaLaTeX, and use TeX Live 2025 or later. This file was tested with TeX Live 2026 (LaTeX 2026-11-01):
\DocumentMetadata{
lang = en,
pdfstandard = ua-2,
tagging = on,
tagging-setup = {math/setup=mathml-SE}
}
\documentclass{article}
\usepackage{unicode-math}
\usepackage{graphicx}
\usepackage{hyperref}
\hypersetup{pdftitle={Reading test results}}
\begin{document}
\section{Results}
Both groups finished the test:
\begin{itemize}
\item group A in the morning,
\item group B in the afternoon.
\end{itemize}
\tagpdfsetup{table/header-rows={1}}
\begin{tabular}{lr}
Group & Score \\ \hline
A & 12 \\
B & 15
\end{tabular}
The mean score is
\[ \bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i \]
\begin{figure}[h]
\centering
\includegraphics[width=0.4\linewidth,alt={Line chart of the scores of both groups}]{chart}
\caption{Scores by group.}
\end{figure}
\end{document}It compiled with no errors or warnings, pdfinfo showed Tagged: yes and PDF version 2.0, and veraPDF passed it as PDF/UA-2. What the keys do:
langsets the document language, so a screen reader uses the right voice.pdfstandard = ua-2targets PDF/UA-2 and makes a PDF 2.0 file.tagging = onturns on the tagging code.tagging-setup = {math/setup=mathml-SE}tags each equation with MathML structure. It needs LuaLaTeX and, withunicode-math, gives math a screen reader can read.\hypersetup{pdftitle=...}gives the PDF a title, which PDF/UA requires.
Use LuaLaTeX: the LaTeX Project’s tagging instructions recommend it for new documents, and it is the engine that generates the MathML. pdfLaTeX also tagged our file, but veraPDF failed it on one rule: the \hline in the table was not marked as an artifact, and booktabs rules gave the same result. The LuaLaTeX file passed.
What LaTeX tags for you
In the test file, every part became a tag with no extra commands, apart from the table header row and the alt text:
| In the .tex file | Tag in the PDF |
|---|---|
\section{Results} | H1, inside a Sect |
| A paragraph | P |
itemize | L, with LI, Lbl and LBody for each item |
tabular after table/header-rows={1} | Table, with TH cells in the first row and TD cells below |
\[ ... \] | Formula, with MathML inside |
\includegraphics[alt={...}] | Figure, with the alt text |
| Page number and table rules | Artifacts, so screen readers skip them |
What you add by hand
- Alt text for every figure, or
artifactfor decoration; see how to add alt text in LaTeX. - Header rows for data tables, with
\tagpdfsetup{table/header-rows={1}}before the table. - The title and the language, as in the file above.
- Real structure commands:
\section, not large bold text, so the heading becomes a heading tag. - Equations as LaTeX math, not images; see how to make math accessible in a PDF.
Fix every LaTeX error too. Overleaf’s documentation notes that a PDF compiled with errors does not have an intact tag structure, even when it looks right.
Get your pdf tagged, accessible from your LaTeX files or pdf remediation
We set up LaTeX theses, papers, templates and slides to compile to tagged PDF/UA-2 files for WCAG 2.1 AA. Every PDF is validated with veraPDF, checked with Adobe Acrobat’s accessibility checker and read with a screen reader before delivery.
How to make a tagged PDF in Overleaf
Overleaf already has TeX Live 2026, so you only change the project settings and add the same block:
- Click the gear icon, or File, then Settings, and choose Compiler.
- Set Compiler to LuaLaTeX. New projects use pdfLaTeX by default.
- Set TeX Live version to 2026. Tagging needs 2025 or later, and an existing project keeps the version it was created with.
- Put the
\DocumentMetadatablock from the file above at the very top of the main.texfile. - Recompile, open Logs and output files, and fix every error.
Overleaf’s TeX Live 2026 announcement says tagging has left the prototype stage and can be used in production, provided the document uses packages and classes that support it. It also warns that some templates in Overleaf’s gallery may not compile with the accessibility options on. Overleaf’s page on creating accessible PDFs covers the same keys. Download the PDF and check it as described above.
Packages and classes that do not support tagging
Tagging only works with packages and classes that support it. Add check-tagging-status to \DocumentMetadata, and LaTeX writes a status report of your class and packages at the end of the log. Part of the report for our test file:
A. CLASS
********
article.cls is compatible
...
3. Partially compatible
--------------------------
amsmath.sty
amsbsy.sty
hyperref.sty
nameref.styIf every package shows up as unclassified, the status list is not installed: in our TinyTeX setup, tlmgr install latex-tagging-status fixed that. The LaTeX Tagging Project keeps the same list online as its tagging status page.
- For errors that appear once tagging is on, see how to fix LaTeX tagging errors.
- Beamer does not support tagging. For slides, use the ltx-talk class.
- Overleaf’s documentation lists the old accessibility package among packages that are no longer valid or maintained, although TeX Live still includes it.
Tagged PDF from Word or Acrobat
Word tags a PDF when you save it the right way, as Microsoft’s guide to accessible PDFs explains:
- Word for Windows: File, Save As, choose PDF, then Options, and keep “Document structure tags for accessibility” selected.
- Word for Mac: in the PDF export, choose “Best for electronic distribution and accessibility (uses Microsoft online service)”.
Acrobat Pro can add tags to an untagged PDF: All tools, then Prepare for accessibility, then Automatically tag PDF. Problems it finds are listed in the Add Tags Report, and Adobe’s help on creating accessible PDFs covers fixing the reading order and tags by hand. If the PDF came from LaTeX or Word, fix the source and export again: tags added to a finished PDF are lost the next time you export.
