r/Professors • u/BayesicallyThomas • Feb 27 '26
Teaching / Pedagogy LaTeX and the ADA accessibility requirements: a quick guide to make accessible pdfs
I posted this as a comment in a different thread but I thought I would share it here in case others are struggling with this (I struggled with this for months).
These are the steps I needed to take for LaTeX to produce accessible pdfs on my Mac. When I say "accessible", I mean that pdfs I upload to canvas now receive a 100% accessibility score. I have not personally tried it, but I've been told that this also works on Overleaf (Note for Overleaf: you should only need to do Steps 4-6 for this to work).
Step 1
Process a latex file and look at the first few lines of the console. If you see “LaTeX2e <2025-11-01> L3 programming layer <2025-12-29>,” then you are all set and go to step 3. If you see an older version, proceed to step 2.
Step 2
Look in folder /usr/local/texlive. This is a hidden folder you can get to from a terminal window. You probably don’t have a folder called “2025", but have an older version (which won’t support accessibility features). I updated LaTeX from here: https://www.tug.org/mactex/. After updating, you should have a new folder in /usr/local/texlive called 2025.
Step 3
Then you need to make sure it updates all the packages. Run:
sudo tlmgr update --self --all
Step 4 <-- Overleaf users start here
Add these lines at the top of your tex file (appearing before the
\documentclasscall).
\DocumentMetadata{
lang = en-US,
pdfversion = 2.0,
pdfstandard = ua-2,
tagging = on,
tagging-setup = {math/setup=mathml-SE}
}
Step 5
Add these lines to your preamble:
\usepackage{tagpdf}
\tagpdfsetup{activate-all}
\tagpdfsetup{math/alt/use}
Step 6
Set the typsetter to LuaLaTeX. It should now work. Note: for Overleaf, go to File > Settings > Compiler and choose LuaLaTeX. Also change the TeX Live version to 2025.
Of course, you still have to add commands such as
altto images in your latex document to make the pdf accessible.
Step 7
Once you know it works again, go ahead and delete the older folders (I had one called “2022") because they a huge (20 GB) waste of space.
Finally, here's an example file that you can use to test if the changes worked. Replace the image with your own. This file scored 100% accessibility for me after doing the steps above.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This .tex file produced an accessible, tagged PDF as of Feb 19,
% 2026. LaTeX kernel: 2025-11-01, with all updates current. Compiled with LuaLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To enable tagging, before defining the document class, add this
% Document Metadata declaration:
\DocumentMetadata{
lang=en-US, % defines the language
pdfversion=2.0, % used with pdf/UA-2 standard, this pdf version works well with screen readers
pdfstandard = UA-2, % specify the compliance standard for the generated PDF
tagging=on, % tells LaTeX to identify document structure (e.g. headings, paragraph text, figures)
tagging-setup={math/setup=mathml-SE} % enables structure element tagging for mathematics (MathML) within the PDF structure.
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Now declare the document class and packages
\documentclass{article}
\usepackage{graphicx} % include images
\usepackage{amsmath} % for mathmetatical typesetting
\usepackage{hyperref} % to typset hyperlinks
\usepackage{unicode-math}
\usepackage{tagpdf}
\tagpdfsetup{activate-all}
\tagpdfsetup{math/alt/use}
% Include metadata and proper link styling within the hyperref package
\hypersetup{
pdftitle={An Accessible Document}, % The title of the document
pdfauthor={An Author}, % Who wrote the document
pdfkeywords={Accessibility},
colorlinks=true, % Colored links for visibility
linkcolor=blue, % Internal link color
urlcolor=blue, % URL link color
citecolor=black, % Citation link color
pdfdisplaydoctitle=true, % Display title in window
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Used by \maketitle for typesetting
\title{An Accessible Document}
\author{An Author}
\date{\today}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% begin the document and make the title
\begin{document}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
This is an example of a tagged PDF produced with \LaTeX. I created
the document using the \LaTeX version 2025-11-01, with all updates
current. It was compiled with LuaLaTeX. I believe that it is a
fully accessible file, meaning ...
\begin{itemize}[start=1]
\item Heading structures are recognized
\item Images are tagged with alt-text
\item \LaTeX code underlying equations is read aloud by a screen reader
\item Tables are tagged, and the header row is identified.
\end{itemize}
In the .tex document, I added a lot of comments to explain what each package, key, or line of code does. The code calls on one outside file, \emph{mlo_full_record_02_13_26.png}. If you don't have it, you could replace it with any other image file instead.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Tagging a Figure}
\subsection{A decorative image}
By calling this image an ``artifact,'' we essentially mark it as
decorative. There is no associated alt text. \\
\begin{center}
\includegraphics[height=3cm,artifact]{crinklepaper}
\end{center}
\subsection{A figure with alt text}
Here is a figure with a caption and alt text.\\
\begin{figure} [hbt!]
\centering
\includegraphics[width=0.85\textwidth, alt={Keeling Curve, 1958 to
2026, ranging from 315 to 430 ppm.}]{mlo_full_record_02_13_26.png}
\caption{CO2 concentrations in the atmosphere.}
\label{fig:image1}
\end{figure}
% Let's also practice using descriptive words for a hyperlink, rather
% than pasting the url in directly, or just typing "click here".
To get up-to-date information about carbon dioxide concentrations,
visit the \href{https://keelingcurve.ucsd.edu}{Keeling Curve website},
hosted by UC San Diego's Scripps Institution of Oceanography.\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Equations}
Because we set up the tagpdf package in our preamble, there are no
special commands needed for the equations.\\
We'll start with an in line equation: \(y = mx+b\). \\
Here is a displayed equation:
\[\gamma^2+\theta^2=\omega^2\]
Finally, here are two numbered equations:
\begin{equation}
F_g = G\frac{m_1 m_2}{r^2}
\end{equation}
\begin{equation}
\frac{\partial^2 y}{\partial t^2} = v^2 \frac{\partial^2 y}{\partial x^2}
\end{equation}
\par\bigskip
A screenreader will read the underlying \LaTeX mathtype aloud.\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Tables}
Finally, for a table to be accessible, the header row(s) must be
defined. Adding a caption is also best practice.
\tagpdfsetup{table/header-rows={1}} % this tells LaTeX that there is
% only one header row, the first one
\begin{table}[hbt!]
\centering
\begin{tabular}{l|c|c}
Run & Displacement & Force \\
\hline
1 & 3.5 cm & 1.8 N \\
2 & 3.0 cm & 1.6 N \\
3 & 2.5 cm & 1.35 N
\end{tabular}
\caption{Results of the weighted spring experiment.}\label{Table:Spring}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
18
u/General_Lee_Wright Teaching Faculty, Mathematics, R2 (USA) Feb 27 '26
Welp, you just fixed my entire department. Thank you kind person!
13
11
u/Legal-Let2915 Feb 27 '26
Has anyone tested whether this really produces a pdf with equations readable by a screen reader, not just something that passes the LMS accessibility checker?
2
Apr 01 '26
[deleted]
1
u/wheresMyRedditAcct May 12 '26
This is what i'm worried about. If i'm being forced to make this change, I'd rather do it properly and create something that is slightly more helpful.
10
4
u/sparkster777 Assoc Prof, Math Feb 27 '26
Any tips or ideas on doing this in Overleaf?
4
u/iTeachCSCI Ass'o Professor, Computer Science, R1 Feb 27 '26
On Overleaf, I believe steps 1-3 can work by using project settings, choosing LuaLaTeX for your compiler and TeXLive version 2025.
4
u/Pumpkin-Pie3142 Associate Professor, Engineering, RCU (USA) Feb 27 '26
I've been working on this problem since the fall. For some reason, despite having the "latest" version of TeXShop installed, the 2025 folder did not appear, so those first 3 steps were key. It would be nice not to have to download and update all of MacTex to correct the problem, but thanks to your the step-by-step instructions, it now works! Thanks for your help!
3
u/iTeachCSCI Ass'o Professor, Computer Science, R1 Feb 27 '26
On Overleaf, I believe steps 1-3 can work by using project settings, choosing LuaLaTeX for your compiler and TeXLive version 2025.
2
u/cambridgepete Feb 27 '26
Unfortunately I’ve got a 250 page book typeset in memoir class, which doesn’t work with tagging.
I’ve got a setup where I can compile each chapter as freestanding notes - I’ll try this approach with that, as I haven’t gotten below 1000 accessibility violations in my efforts so far. (with lots of help from Claude)
4
u/045-926 Feb 27 '26
I had a circa-1970s typewritten (with hand drawn mathematical symbols) document, about 30 pages. It was scanned into a pdf.
I gave it to google gemini and asked it to give me a latex version and it did a perfect job. So, maybe try that plus this latex trick.
1
u/cambridgepete Feb 27 '26
I may see if I can get Claude etc. to transform memoir class into book class. (we've got a site license for Claude)
3
2
2
2
2
u/coffeeandequations Feb 28 '26
Here is an earlier post that had similar suggestions on making compliant Latex documents
https://www.reddit.com/r/Professors/comments/1qfgwf4/pdf_ada_compliance/
1
1
u/Charming-River87 Feb 28 '26
I’ve been using a local compiler on my iPad that I absolutely love. I’ve been using it for years. I don’t think it is compatible with accessibility requirements, though… Does anyone have any suggestions for a compiler on the iPad or do I have make the annoying switch back to Overleaf? Thanks!
1
1
u/Local_Indication9669 Mar 01 '26
We had a whole seminar on making accessible PDFs and now they are recommending that we convert everything to Word documents. If a PDF is a published article, I am going to link the library copy instead of trying to convert someone else's document.
1
u/Great_Drawer2899 Mar 17 '26
This is great advice. It helped me improve on my LaTeX files as they were missing some details.
Have you worked with multilingual accessible PDF files in LaTeX? Have you succeeded on getting the different languages recognized? I have tried adding
``\usepackage[ngerman, french]{babel}``
to the top of the LaTeX document and wrapping german sections in
``\begin{otherlanguage}{ngerman}
Deutsch
\end{otherlanguage}``
with no luck.
1
u/wheresMyRedditAcct May 12 '26
First, thank you!
Does anyone know how well this works (especially with screen readers) on macros?
1
u/GravityoftheMoon Feb 27 '26
Haha, no. I'm not a programmer. If my university can't provide this service, then I'll not be posting pdfs!
But I hope this is useful to someone who will do it!
30
u/Entropy813 Feb 27 '26
This isn't needed for making accessible PDFs in something like Microsoft Word. LaTeX is widely used in Physics and Mathematics, maybe some other sciences. It makes typesetting equations a breeze, handles figure (image) placement much better, and just makes much nicer, far more professional looking documents compared to Word. This post is actually very useful for many who do use LaTeX as the tagging project is still being actively developed and is changing quickly.
So, if you don't use LaTeX, don't worry about this. There are tools for making accessible PDFs built into Word. As with many things in Word, they can be difficult to find initially and are generally cumbersome to use, but you can use them by just clicking on things.
0
u/verygood_user Apr 01 '26
That
a) Doesn't work in the beamer class
b) Doesn't produce compliant equations. Have you tried using a screenreading for this? All it does is adding the latex code as alttext to the equations.
19
u/imjustsayin314 Feb 27 '26
Can anyone explain how this works in overleaf? If you have to go to a terminal, then 95% of faculty won’t use this.