-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccessible_article.tex
More file actions
669 lines (528 loc) · 27 KB
/
accessible_article.tex
File metadata and controls
669 lines (528 loc) · 27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
% ======================================================================
% DOCUMENT METADATA - REQUIRED FOR ACCESSIBILITY
% ======================================================================
% This MUST be the first thing in your document, before \documentclass
% It configures the PDF for accessibility compliance
\DocumentMetadata{
% Request both PDF/A archival conformance and PDF/UA accessibility tagging
pdfstandard=a-2u, % PDF/A-2u format (archival standard with Unicode support)
pdfstandard=ua-1, % Add PDF/UA-1 accessibility conformance target
pdfversion=1.7, % Explicit PDF version used for compatibility with conformance tooling
lang=en-US, % Document language (required for screen readers)
tagging=on, % Enable PDF tagging (required for accessibility)
tagging-setup={
math/alt/use, % Keep math accessibility enabled (screen readers get tagged math)
math/mathml/AF=false, % Do not embed MathML as PDF Associated Files (helps some strict conformance checkers)
math/tex/AF=false, % Do not embed TeX source as Associated Files
math/mathml/sources= % Clear MathML source attachment list (avoid extra embedded helper files)
}
}
% CRITICAL REQUIREMENTS:
% - LaTeX Engine: LuaLaTeX required for this template
% * pdfLaTeX has partial support but requires manual MathML files
% * XeLaTeX does NOT support accessibility tagging
% - TeX Distribution: TeX Live 2023 or later with all packages updated
% * TeX Live 2022 or earlier will NOT work
% * Update using TeX Live Manager (Windows) or TeX Live Utility (Mac)
% - Overleaf: YES, this works on Overleaf via Overleaf Labs program
% * Opt in at: https://www.overleaf.com/labs/participate
% * Enable "Rolling TeX Live releases"
% * Select "Rolling TeXLive (labs)" in project settings
% * Set Compiler to LuaLaTeX
\documentclass{article}
% ======================================================================
% PACKAGE IMPORTS
% ======================================================================
\usepackage[margin=1in]{geometry}%
\usepackage{fontspec} % Font selection for LuaLaTeX (provides \setmainfont, \setsansfont)
\usepackage{unicode-math} % Unicode math fonts (provides \setmathfont + automatic MathML)
\usepackage{graphicx} % Graphics support (for \includegraphics)
\usepackage{booktabs} % Professional-quality tables
\usepackage{xcolor} % Color support (needed for accessibility-friendly colors)
\usepackage[normalem]{ulem} % Underline support (normalem prevents emphasis from being underlined)
% ======================================================================
% ACCESSIBILITY CONFIGURATION
% ======================================================================
% Configure PDF tagging for accessibility compliance
% Math accessibility and MathML/AF behavior are configured in
% \DocumentMetadata tagging-setup above.
%
% IMPORTANT NOTE ABOUT PDF BOOKMARKS:
% "tagging = on" enables PDF TAGGING (structure tree for screen readers).
% It does NOT automatically generate PDF bookmarks (navigation outline).
% For articles, standard LaTeX \tableofcontents and hyperref handle bookmarks.
% If you want section bookmarks without a printed TOC, add:
% \usepackage{bookmark}
% \bookmarksetup{startatroot}
% in your preamble. But this is OPTIONAL - not required for accessibility.
% ======================================================================
% COLOR DEFINITIONS
% ======================================================================
% Define colors with sufficient contrast for WCAG 2.1 Level AA compliance
% All colors should have at least 4.5:1 contrast ratio with white background
\colorlet{AccessibleRed}{red!80!black} % Darker red for better contrast
\colorlet{AccessibleGreen}{green!40!black} % Darker green for WCAG AA compliance (4.5:1 contrast)
\definecolor{AltYellow}{RGB}{255,245,170} % Soft yellow for highlighting code
% ======================================================================
% CUSTOM COMMANDS FOR TEXT COLORS
% ======================================================================
% Shortcuts for commonly used colors in teaching materials
% Use these to maintain consistent, accessible colors throughout your documents
\newcommand\tb[1]{\textcolor{blue}{#1}} % Blue text
\newcommand\tr[1]{\textcolor{AccessibleRed}{#1}} % Red text (accessible)
\newcommand\tg[1]{\textcolor{AccessibleGreen}{#1}} % Green text (accessible)
% Note: Plain yellow fails WCAG contrast requirements - use AltYellow for backgrounds only
% ======================================================================
% CUSTOM COMMANDS FOR HIGHLIGHTED CODE
% ======================================================================
% \AltBox highlights code snippets with yellow background
% Useful for drawing attention to required accessibility changes in examples
\newcommand{\AltBox}[1]{%
{\setlength{\fboxsep}{0pt}%
\colorbox{AltYellow}{\texttt{#1}}}%
}
% ======================================================================
% HYPERLINK CONFIGURATION
% ======================================================================
% Links should be both colored AND underlined for accessibility
% Color alone is not sufficient (fails WCAG guidelines)
\usepackage{url,hyperref}
\urlstyle{same} % URLs use the same font as surrounding text
% Custom commands for underlined hyperlinks
\newcommand{\hrefu}[2]{\href{#1}{\uline{#2}}} % Hyperlink with underline
\newcommand{\urlu}[1]{\uline{\url{#1}}} % URL with underline
% Set link colors (blue for consistency)
\hypersetup{
colorlinks=true,
linkcolor=blue, % Internal links (TOC, references)
urlcolor=blue, % External URLs
citecolor=blue % Citations
}
% ======================================================================
% DOCUMENT INFORMATION
% ======================================================================
% Define title, author, and date for article class
\title{Accessible Documents in LaTeX \\ \normalsize \urlu{https://github.com/rhstanton/accessible_LaTeX} \\ \ \\ \large Version 1.5}
\author{Richard Stanton \\ \hrefu{mailto:richard.stanton@berkeley.edu}{richard.stanton@berkeley.edu} \\ UC Berkeley}
\date{\today}
% ======================================================================
% BEGIN DOCUMENT
% ======================================================================
\begin{document}
\maketitle
\section{Introduction}
On January 8, 2026, we were notified by campus that, beginning on April 24, 2026:
\begin{quotation}
\color{blue}
``The updated requirements of the ADA require that digital course materials provided to students, even materials inside password-protected course sites like bCourses, will need to comply with accessibility standards (Web Content Accessibility Guidelines (\hrefu{https://www.w3.org/WAI/standards-guidelines/wcag/}{WCAG}) 2.1 Level AA).''
\end{quotation}
\noindent Many of us use \LaTeX\ to create teaching materials---both slides and documents. Standard \LaTeX\ (including Beamer) does not automatically generate accessible PDFs.
\section{What is this project?}
An experiment exploring accessible \LaTeX\ documents using the \LaTeX\ Tagging Project:
\begin{itemize}
\item \tg{Two templates:} Articles (\texttt{article} class) and slides (\texttt{ltx-talk})
\item \tg{Shows:} What's common to both, what's different
\item \tg{Contains:} Working examples with math, text, graphics, and tables
\item \tg{Scores:} Perfect 100\% from the bCourses accessibility checker (Ally)
\end{itemize}
\subsection{How to use it}
\begin{enumerate}
\item \textbf{Learn the common requirements:} Apply to any \LaTeX\ document
\item \textbf{See class-specific needs:} Understand slides vs. articles
\item \textbf{Copy and adapt:} Use as templates for your documents
\item \textbf{Study the code:} Heavily commented for learning
\end{enumerate}
\bigskip
\noindent Available at: \urlu{https://github.com/rhstanton/accessible_LaTeX}
\subsection{Converting to accessible LaTeX: Overview}
\begin{itemize}
\item {\color{AccessibleGreen}\textbf{Your existing \LaTeX\ skills transfer}} - you're just adding accessibility features
\item {\color{AccessibleGreen}\textbf{The changes are minimal}} and follow consistent patterns
\end{itemize}
\bigskip
\noindent \textbf{Common requirements} (both slides \& articles):
\begin{itemize}
\item Add document metadata and enable PDF tagging
\item Tag images with alt text; tag table headers
\item Use accessible colors; compile with LuaLaTeX
\end{itemize}
\bigskip
\noindent \textbf{Key difference:}
\begin{itemize}
\item Articles: {\color{AccessibleGreen}Keep your existing class!} Just add accessibility features
\item Slides: Switch to \texttt{ltx-talk} (similar syntax, but recreate styling)
\end{itemize}
\bigskip
\noindent Both require LaTeX kernel 2025-11-01 or later (see next sections for details).
\bigskip
\noindent {\color{blue}See ``Getting started'' sections at the end for detailed steps}. For complete LaTeX Tagging Project documentation, see \hrefu{https://latex3.github.io/tagging-project/documentation/usage-instructions}{latest detailed instructions}.
\section{TeX version requirements (both slides and articles)}
\begin{itemize}
\item \tg{Minimum:} TeX Live 2023 or later with all packages updated
\item \tg{Critical:} Must have LaTeX kernel 2025-11-01 or later
\begin{itemize}
\item Update via TeX Live Manager (Windows) or TeX Live Utility (Mac)
\item Or use Overleaf Labs (see next section)
\end{itemize}
\item \tr{Will NOT work:} TeX Live 2022 or earlier
\end{itemize}
\section{\tb{You \textbf{CAN} use Overleaf (both slides and articles)}}
\begin{itemize}
\item \texttt{ltx-talk} requires a very recent \textbf{LaTeX kernel} (2025-11-01 or later)
\item This is available through Overleaf's \tb{Labs program} (not standard Overleaf)
\end{itemize}
\subsection{Using Overleaf (2 steps)}
\begin{enumerate}
\item \textbf{Join Overleaf Labs}:
\begin{itemize}
\item Visit \urlu{https://www.overleaf.com/labs/participate}
\item Opt in and enable ``Rolling TeX Live releases''
\end{itemize}
\item \textbf{Configure project}:
\begin{itemize}
\item Set TeX Live version to \tg{``Rolling TeXLive (labs)''} (bottom of list)
\item Set Compiler to \tg{LuaLaTeX}
\end{itemize}
\end{enumerate}
\noindent \textbf{Resources}: \urlu{https://docs.overleaf.com/writing-and-editing/creating-accessible-pdfs}
\section{Common requirements for ALL documents}
Whether you're creating slides or articles, these requirements are \tb{the same}:
\subsection{Document Metadata}
\begin{itemize}
\item Every accessible document \tr{must} begin with \texttt{\textbackslash DocumentMetadata}
\item Goes \emph{before} \texttt{\textbackslash documentclass}
\end{itemize}
\bigskip
\noindent \fbox{%
\begin{minipage}{0.9\linewidth}
{\ttfamily\small
\textbackslash DocumentMetadata\{\\[0.5ex]
\hspace*{0.2in}pdfstandard=a-2u,\hspace*{0.3in}\% PDF/A-2u format\\[0.5ex]
\hspace*{0.2in}pdfstandard=ua-1,\hspace*{0.26in}\% Add PDF/UA-1 conformance target\\[0.5ex]
\hspace*{0.2in}pdfversion=1.7,\hspace*{0.31in}\% Explicit PDF version\\[0.5ex]
\hspace*{0.2in}lang=en-US,\hspace*{0.69in}\% Language for screen readers\\[0.5ex]
\hspace*{0.2in}tagging=on,\hspace*{0.73in}\% Enable PDF tagging\\[0.5ex]
\hspace*{0.2in}tagging-setup=\{\\[0.5ex]
\hspace*{0.4in}math/alt/use,\hspace*{0.2in}\% Keep math accessibility enabled (screen readers get tagged math)\\[0.5ex]
\hspace*{0.4in}math/mathml/AF=false,\hspace*{0.03in}\% Do not embed MathML as PDF Associated Files\\[0.5ex]
\hspace*{0.4in}math/tex/AF=false,\hspace*{0.2in}\% Do not embed TeX source as Associated Files\\[0.5ex]
\hspace*{0.4in}math/mathml/sources=\hspace*{0.06in}\% Clear MathML source attachment list\\[0.5ex]
\hspace*{0.2in}\}\\[0.5ex]
\}
}
\end{minipage}
}
\bigskip
\noindent This configures accessibility, math tagging, and validator-compatibility behavior in one place.
\noindent The \texttt{tagging-setup} entries keep math accessible while reducing helper attachments that can trigger warnings in some strict conformance validators.
\subsection{Images, Tables, and Colors}
\begin{itemize}
\item \textbf{Images:} All images must include alt text descriptions
\begin{itemize}
\item Allows screen readers to describe visual content
\item Even decorative images need marking
\item See dedicated ``Figures'' section for examples
\end{itemize}
\bigskip
\item \textbf{Tables:} Must specify which rows are headers
\begin{itemize}
\item Helps screen readers navigate table structure
\item Essential for data accessibility
\item See dedicated ``Tables'' section for examples
\end{itemize}
\end{itemize}
\bigskip
\begin{itemize}
\item \textbf{Accessible colors:} WCAG 2.1 requires 4.5:1 contrast ratio
\end{itemize}
\bigskip
\noindent \fbox{%
\begin{minipage}{0.9\linewidth}
{\ttfamily\small
\textbackslash colorlet\{AccessibleRed\}\{red!80!black\}\\[0.5ex]
\textbackslash colorlet\{AccessibleGreen\}\{green!40!black\}\\[0.5ex]
\% Standard blue is fine as-is
}
\end{minipage}
}
\bigskip
\subsection{LuaLaTeX Compilation}
\begin{itemize}
\item You \tr{must} compile with LuaLaTeX (not pdfLaTeX or XeLaTeX)
\bigskip
\item \textbf{Why LuaLaTeX?}
\begin{enumerate}
\item \textbf{Automatic MathML:} Makes math accessible without manual work
\item \textbf{Full tagging support:} Complete PDF accessibility features
\item \textbf{Modern fonts:} Handles Unicode and OpenType fonts
\end{enumerate}
\bigskip
\item \textbf{How to switch:}
\begin{itemize}
\item Command line: \texttt{lualatex filename.tex}
\item Most editors: Select ``LuaLaTeX'' from compiler menu
\end{itemize}
\end{itemize}
\section{The basics}
\begin{itemize}
\item Use standard \LaTeX\ environments: \texttt{section}, \texttt{subsection}, \texttt{itemize}, \texttt{enumerate}, etc.
\item {\color{blue}\textbf{Existing source files don't need a lot of editing}}
\item Here's some gratuitous $\mathit{math}$ for the accessibility checker
\end{itemize}
\section{Figures}
When including a figure, you \tr{must provide alt text} describing the image for screen readers. This is \emph{required} for accessibility compliance.\\
\noindent \fbox{%
\ttfamily\small
\textbackslash includegraphics[height=.4\textbackslash textheight,%
\AltBox{alt=\{A capybara\}}%
]\{capybara.jpg\}%
}
\begin{figure}[htbp]
\begin{center}
\includegraphics[height=2.75in, alt={A capybara}]{capybara.jpg}
\end{center}
\caption{A picture of a capybara}
\end{figure}
\section{Tables}
When including a table, you \tr{must specify which rows are headers}. Screen readers use this information to help users navigate table content.
Use \texttt{\textbackslash tagpdfsetup\{table/header-rows=\{...\}\}} \emph{before} the \texttt{tabular} environment:
\begin{itemize}
\item Use \texttt{\{1\}} for 1 header row
\item Use \texttt{\{1,2\}} for 2 header rows
\item Use \texttt{\{1,2,3\}} for 3 header rows, etc.
\item \textbf{Validator note:} PAC can sometimes report \texttt{Table header cell has no associated subcells} even when headers are tagged correctly. The LaTeX team documents this behavior at \urlu{https://github.com/latex3/tagging-project/issues/1056}.
\end{itemize}
\subsection{Example: Table with 3 Header Rows}
\noindent \fbox{%
\begin{minipage}{0.95\linewidth}
\ttfamily\small
\AltBox{\textbackslash tagpdfsetup\{table/header-rows=\{1,2,3\}\}} \\
\textbackslash begin\{tabular\}\{ccccrcccr\} \\
\textbackslash toprule \\
\textrm{\color{blue}\small $\leftarrow$ 3 header rows} \\
\textbackslash midrule \\
\textrm{\color{AccessibleGreen}\small $\leftarrow$ data rows} \\
\textbackslash bottomrule \\
\textbackslash end\{tabular\}
\end{minipage}
}
\begin{table}[htbp]
\begin{center}\footnotesize
% PAC may warn about subcell associations here even when header tagging is correct; see README for details.
\tagpdfsetup{table/header-rows={1,2,3}}
\begin{tabular}{ccccrcccr}
\toprule
\color{blue} & \color{blue} & \color{blue} & \color{blue} & \multicolumn{1}{c}{\color{blue}Days} & \color{blue}Days in & \color{blue} & \color{blue} & \color{blue}\\
\color{blue}Payment & \color{blue}Caplet & \color{blue} & \color{blue}Forward & \multicolumn{1}{c}{\color{blue}to} & \color{blue}accrual & \color{blue} & \color{blue}\\
\color{blue}date & \color{blue}expiry date & \color{blue}$DF_\text{pay}$ & \color{blue}rate & \multicolumn{1}{c}{\color{blue}expiry} & \color{blue}period & \color{blue}$T_\text{expiry}$ & \color{blue}$\Delta$ & \multicolumn{1}{c}{\color{blue}Caplet} \\
\midrule
\color{AccessibleGreen}2004/12/01 & \color{AccessibleGreen}--- & \color{AccessibleGreen}0.99550 & \color{AccessibleGreen}0.01790 & \color{AccessibleGreen}0 & \color{AccessibleGreen}91 & \color{AccessibleGreen}0.00000 & \color{AccessibleGreen}0.25278 & \color{AccessibleGreen}--- \hspace*{0.15in}\\
\color{AccessibleGreen}2005/03/01 & \color{AccessibleGreen}2004/11/29 & \color{AccessibleGreen}0.99008 & \color{AccessibleGreen}0.02188 & \color{AccessibleGreen}89 & \color{AccessibleGreen}90 & \color{AccessibleGreen}0.24384 & \color{AccessibleGreen}0.25000 & \color{AccessibleGreen}1,178.77\\
\color{AccessibleGreen}2005/06/01 & \color{AccessibleGreen}2005/02/25 & \color{AccessibleGreen}0.98401 & \color{AccessibleGreen}0.02413 & \color{AccessibleGreen}177 & \color{AccessibleGreen}92 & \color{AccessibleGreen}0.48493 & \color{AccessibleGreen}0.25556 & \color{AccessibleGreen}4,844.73\\
\color{AccessibleGreen}2005/09/01 & \color{AccessibleGreen}2005/05/27 & \color{AccessibleGreen}0.97733 & \color{AccessibleGreen}0.02675 & \color{AccessibleGreen}268 & \color{AccessibleGreen}92 & \color{AccessibleGreen}0.73425 & \color{AccessibleGreen}0.25556 & \color{AccessibleGreen}10,016.71\\
\bottomrule
\end{tabular}
\end{center}
\caption{A table}
\end{table}
\section{Common pitfalls}
\begin{itemize}
\item \tr{Confusing PDF tagging with PDF bookmarks}
\begin{itemize}
\item \texttt{tagging=on} creates structure tree for \tg{screen readers} (required for accessibility!)
\item PDF bookmarks (navigation outline in left pane) are \tg{separate and optional}
\item Bookmarks do NOT generate automatically from \texttt{tagging=on}
\item For articles: use \texttt{\textbackslash tableofcontents} or the \texttt{bookmark} package
\item For slides: See custom bookmark code in \texttt{accessible\_slides.tex} preamble (Part 2)
\end{itemize}
\item \tr{Forgetting alt text for images}
\begin{itemize}
\item Every \texttt{\textbackslash includegraphics} needs an \texttt{alt=\{...\}} parameter
\item For purely decorative images, use empty alt text: \texttt{alt=\{\}}
\end{itemize}
\item \tr{Not specifying table header rows}
\begin{itemize}
\item Add \texttt{\textbackslash tagpdfsetup\{table/header-rows=\{...\}\}} before each table
\item Use \texttt{\{1\}} for 1 header row, \texttt{\{1,2\}} for 2 header rows, etc.
\end{itemize}
\item \tr{Insufficient color contrast}
\begin{itemize}
\item WCAG 2.1 requires 4.5:1 contrast ratio for normal text
\item Avoid light colors: \texttt{yellow}, \texttt{cyan} fail contrast requirements
\item Darken \texttt{red} and \texttt{green}: use \texttt{red!80!black}, \texttt{green!40!black}
\item Standard \texttt{blue} is fine and meets WCAG requirements
\item Test with a contrast checker: \urlu{https://webaim.org/resources/contrastchecker/}
\end{itemize}
\item \tr{Using the wrong compiler}
\begin{itemize}
\item Make sure your editor is set to use \tg{LuaLaTeX}, not \tr{pdfLaTeX}
\end{itemize}
\item \tr{Old TeX distribution}
\begin{itemize}
\item TeX Live 2022 or earlier won't work
\item Update packages using TeX Live Manager (Windows) or TeX Live Utility (Mac)
\end{itemize}
\end{itemize}
\section{What to ADD to existing documents}
When converting existing LaTeX files to be accessible, here's what you need to add:
\subsection{Required additions for ALL documents}
\begin{enumerate}
\item \textbf{At the very top} (before \texttt{\textbackslash documentclass}):
\medskip
\noindent\fbox{%
\begin{minipage}{0.9\linewidth}
{\ttfamily\small
\AltBox{\textbackslash DocumentMetadata\{} \\
\hspace*{0.2in}pdfstandard=a-2u,\\
\hspace*{0.2in}pdfstandard=ua-1,\\
\hspace*{0.2in}pdfversion=1.7,\\
\hspace*{0.2in}lang=en-US,\\
\hspace*{0.2in}tagging=on,\\
\hspace*{0.2in}tagging-setup=\{...see template...\}\\
\AltBox{\}}
}
\end{minipage}
}
\medskip
\item \textbf{In every} \texttt{\textbackslash includegraphics} command:
\medskip
\noindent\fbox{%
\begin{minipage}{0.9\linewidth}
{\ttfamily\small
\textbackslash includegraphics[\AltBox{alt=\{Description of image\}}]\{file\}
}
\end{minipage}
}
\medskip
\item \textbf{Before every table}:
\medskip
\noindent\fbox{%
\begin{minipage}{0.9\linewidth}
{\ttfamily\small
\AltBox{\textbackslash tagpdfsetup\{table/header-rows=\{1\}\}}\\
\textbackslash begin\{tabular\}\{...\}
}
\end{minipage}
}
\medskip
\item \textbf{Change your compiler to LuaLaTeX} (not pdfLaTeX or XeLaTeX)
\end{enumerate}
\subsection{Additional for existing Beamer slides}
\begin{itemize}
\item Change \texttt{\textbackslash documentclass\{beamer\}} to \texttt{\textbackslash documentclass[frame-title-arg]\{ltx-talk\}}
\item Remove all Beamer themes, color schemes, and template commands
\item Keep your \texttt{\textbackslash begin\{frame\}} environments as-is
\item Recreate styling using standard LaTeX packages (xcolor, fontspec, etc.)
\item This is \tg{one-time preamble work}---then reuse for all future talks!
\end{itemize}
\section{Getting started: Common steps for both}
\begin{enumerate}
\item \textbf{Setup environment:} Use Overleaf Labs OR install/update TeX Live locally
\begin{itemize}
\item Overleaf: See earlier section for Labs setup
\item Local: Update via TeX Live Manager (Windows) or TeX Live Utility (Mac)
\end{itemize}
\item \textbf{Get templates:} Download from \urlu{https://github.com/rhstanton/accessible_LaTeX}
\item \textbf{Add accessibility features:}
\begin{itemize}
\item Add \texttt{alt} text to images
\item Add \texttt{table/header-rows} to tables
\end{itemize}
\item \textbf{Set compiler to LuaLaTeX}
\item \textbf{Compile:}
\begin{itemize}
\item Compile with LuaLaTeX
\end{itemize}
\end{enumerate}
\section{Getting started: What's different by document type}
\subsection{For Articles (using \texttt{article}, \texttt{report}, \texttt{book}, etc.)}
\begin{itemize}
\item Add \texttt{\textbackslash DocumentMetadata} before \texttt{\textbackslash documentclass}
\item Include the \texttt{tagging-setup} block in \texttt{\textbackslash DocumentMetadata} (as shown in this template)
\item Switch to \texttt{fontspec} and \texttt{unicode-math} packages
\item \tg{Keep your existing documentclass!}
\end{itemize}
\subsection{For Slides (migrating from Beamer)}
\begin{itemize}
\item Copy preamble from \texttt{accessible\_slides.tex}
\item Change \texttt{\textbackslash documentclass\{beamer\}} to \texttt{\textbackslash documentclass[frame-title-arg]\{ltx-talk\}}
\item \tr{Remove Beamer themes/templates/colors}
\item \tg{Recreate styling} using standard LaTeX/xcolor
\item \tg{One-time preamble work}---then reuse for all future talks!
\end{itemize}
\section{Validation workflow: use multiple checkers}
\begin{itemize}
\item No single checker catches everything.
\item Accessibility usability checks and strict PDF conformance checks are not identical.
\item A practical workflow is to run more than one checker and compare findings.
\end{itemize}
\noindent \textbf{Checkers used so far:} Ally (the accessibility checker built into bCourses), veraPDF (open-source PDF conformance validator, \urlu{https://verapdf.org/}), PAC (PDF Accessibility Checker, \urlu{https://pac.pdf-accessibility.org/}), and Acrobat.
\section{Optional validator cleanup step: \texttt{strip\_af.py}}
\begin{itemize}
\item The metadata settings alone are enough to generate a 100\% score on Ally.
\item Stricter checkers (e.g., \tr{veraPDF}) may still complain about /AF or embedded-file structures.
\item Optional strict-archival cleanup command:
\end{itemize}
\begin{quote}\ttfamily
python strip\_af.py build/yourfile.pdf
\end{quote}
\begin{itemize}
\item Then validate \texttt{build/yourfile.pdf} with \texttt{veraPDF}.
\item Prerequisite for the script: \texttt{python -m pip install pikepdf}
\end{itemize}
\section{Validator-specific notes}
\begin{itemize}
\item \textbf{Not all validator warnings indicate real source problems.}
\item \textbf{Acrobat: ``Lbl and LBody -- Failed''}
\begin{itemize}
\item Often appears around figure captions, section numbers, and table captions
\item This is usually an Acrobat checker bug, not a source-tagging error
\item The \texttt{<Lbl>} tag is valid for numbering
\item Reference: \urlu{https://tex.stackexchange.com/a/709655/2388}
\end{itemize}
\item \textbf{PAC table warning (known behavior)}
\begin{itemize}
\item PAC can report \texttt{Table header cell has no associated subcells} even when \texttt{table/header-rows} is correct
\item The LaTeX Tagging Project documents this behavior at \urlu{https://github.com/latex3/tagging-project/issues/1056}
\end{itemize}
\item \textbf{When this warning appears}
\begin{itemize}
\item First confirm source markup is correct (especially \texttt{table/header-rows})
\item Keep source tagging and document the validator warning
\item Report minimal reproductions to tool vendors when possible
\end{itemize}
\item \textbf{Interpretation tip}: Treat one-tool warnings as signals to investigate, not automatic proof of source errors.
\end{itemize}
\bigskip
\noindent Questions or suggestions? \hrefu{mailto:richard.stanton@berkeley.edu}{richard.stanton@berkeley.edu}
\end{document}
% ======================================================================
% EMACS/AUCTEX LOCAL VARIABLES (Optional - for Emacs users only)
% ======================================================================
% The section below configures Emacs/AUCTeX to use the correct LaTeX engine
% and options when compiling this file from within Emacs.
%
% If you use Emacs/AUCTeX: These settings ensure LuaLaTeX is used automatically
% If you use a different editor: You can safely ignore or delete this section
%
% Key settings explained:
% - TeX-engine: luatex -> Forces LuaLaTeX (REQUIRED FOR THIS TEMPLATE)
% - TeX-command-extra-options -> Adds -interaction=nonstopmode flag
% - TeX-master: t -> This file is its own master document
% - eval: commands -> Custom Emacs functions for this file
%
% IMPORTANT: This template requires LuaLaTeX for automatic MathML generation
% Using pdflatex will require manual MathML files (tedious and error-prone)
%
% For other editors (TeXShop, TeXworks, Overleaf, VS Code, etc.):
% Configure them manually to use LuaLaTeX with -interaction=nonstopmode
%%% Local Variables:
%%% mode: latex
%%% TeX-engine: luatex
%%% TeX-command-extra-options: "-interaction=nonstopmode"
%%% TeX-master: t
%%% eval: (setq-local TeX-command-list (cons '("LatexMk (build)" "latexmk -lualatex -interaction=nonstopmode -file-line-error -synctex=1 -shell-escape -outdir=build %s" TeX-run-TeX nil t :help "Run LatexMk with LuaLaTeX") (remove-if (lambda (x) (equal (car x) "LatexMk (build)")) TeX-command-list)))
%%% eval: (setq org-format-latex-header "\documentclass[10pt]{RSorg}\pagestyle{empty}")
%%% eval: '(hide-latex-preamble)
%%% eval: (outline-hide-body)
%%% End: