How to produce an accessible PDF from LaTeX
- Update your distribution. Use TeX Live 2025 or later, or set that version in Overleaf.
- Turn on tagging. Add \DocumentMetadata{lang=en-US, tagging=on} as the first line, before \documentclass.
- Add alt text and structure. Use sectioning commands, set the title, and give each graphic alt text.
- Compile with LuaLaTeX. LuaLaTeX is the preferred engine, especially for documents with mathematics.
- Check and fix. Check the PDF and fix remaining problems in the source or with the fixer.
How LaTeX tagging works now
For years, LaTeX output was untagged by default and making it accessible meant fragile add-on packages. The LaTeX Project's tagging project has changed that: the kernel can now produce a structure tree directly. You switch it on with \DocumentMetadata at the top of the file. As of the November 2025 LaTeX release, a bare \DocumentMetadata{} does not turn tagging on by itself, so state tagging=on explicitly.
A typical start looks like: \DocumentMetadata{lang=en-US, pdfstandard=ua-2, tagging=on}, followed by \documentclass{article}. On Overleaf, choose TeX Live 2025 or later in the project settings so the tagging keys are recognized.
Good practice in the source
- Use sectioning commands (\section, \subsection) so headings are tagged correctly.
- Set the title and language in \DocumentMetadata and with \title; the hyperref package's pdftitle can also set the PDF title.
- Add alt text to graphics: \includegraphics accepts an alt key in the tagging-enabled kernel; decorative images can be marked as artifacts.
- Use LuaLaTeX with unicode-math for mathematics; the tagging code can attach MathML to formulas.
- Keep tables simple and identify header rows where the tagging setup supports it.
- Check package compatibility against the tagging project's status list before relying on a specialized package.
What typically breaks
The tagging code is still evolving. Older document classes and some popular packages are not yet fully compatible, and may produce warnings or untagged content. Common issues are figures without alt text, complex tables tagged without header relationships, custom title pages and headers built with low-level commands, beamer slides (whose support lags behind article-style documents), and older TeX distributions that silently ignore the keys. University and journal templates can also override settings.
Check, then fix what remains
Upload the compiled PDF to the checker to see what came through. If you cannot fix an issue in the source, for example an incompatible template, the fixer can tag or repair the PDF directly and add title, language and the PDF/UA identifier. Mathematics is best handled in the source, where the tagging code can attach MathML; fixing a PDF after the fact cannot add the same rich math structure, so formulas may need alt text instead.
Sources
This page is general information, not legal advice. Automated checks cannot prove full compliance; some requirements need human review.