[accessibility] Revisiting creation of accessible PDF files

Ulrike Fischer fischer at troubleshooting-tex.de
Wed Jan 24 12:44:46 CET 2024


Well you can create tagged PDF with LaTeX, and if you keep the document 
simple (which also means that you should use a standard class and 
shouldn't load various external packages) then it is quite automatic.

Most of the elements described in the Leslie Lamport Manual are already 
supported (and some more will be added with the next latex(-dev) release).

Form fields are supported too if you use the l3pdffield-testphase 
package, but the tagging not much tested regarding usability as I have 
no one who can test and does report finding ;-)

If you want to try it be aware that this is all in development and so

* you need a current (really current) texsystem that you also keep 
up-to-date.

* things can change (e.g. option names)

* not every works yet. Errors and questions can be reported as issue or 
as discussion https://github.com/latex3/tagging-project

* Most of the code is at our latex2e github in latex-lab in various dtx 
files, the various documentation can be accessed with texdoc -l 
latex-lab, but sadly the documentation is currently not tagged as it 
doesn't use a standard class and various specific elements that must be 
adapted first.

* I would recommend to use lualatex, it normally gives the best results.

An example how something with a heading, a table and two form fields is 
tagged would be:

\DocumentMetadata
  {uncompress, %for debugging and issues
   testphase={phase-III,table}}

\documentclass{article}
\usepackage{l3pdffield-testphase}

\ExplSyntaxOn
\cs_set_eq:NN \formcheckbox\pdffield_checkbox:n
\cs_set_eq:NN \formtextfield\pdffield_textfield:n
\ExplSyntaxOff

% first row of a tabular is always the header:
\tagpdfsetup{table-header-rows=1}

\begin{document}

\section{A test with formfields}

\formcheckbox{name=check}

\formtextfield{name=date,width=4cm,setfieldflags={comb},MaxLen=10}

and a table

\begin{tabular}{ll}
head A & head B\\
col1A  & col1B\\
col2A & col2B
\end{tabular}

\end{document}

Ulrike Fischer




Am 24.01.2024 um 02:17 schrieb Cory Samaha:
> Hello Everyone,
> 
> I believe I had brought this up a while ago, but I wanted to revisit this subject in case anything changed in the past couple of years and if there is perhaps a more streamlined approach to this process.
> 
> I often receive PDF files from my employer and they ask me to review these files for accessibility. Unfortunately, many times these files fall short in many areas. The documents in question contain form fields, tables, headings and so on, however the form fields are not labeled correctly, tables are not marked with row and column headers and you get the idea. When I had last enquired about remediating pdf documents to be more accessible, the answer seemed to be to start with a LaTeX file and include a package that would convert the forms / elements into properly labeled and interactive elements. The only down side to this is that this process is a bit more lengthy for me than one of my sighted counterparts who can click around and create the tagging structure necessary for a screen reader.
> 
> As far as I know, Adobe Acrobat has not improved their accessibility on that end, although if I am wrong feel free to correct me. Is LaTeX still the best option when it comes to PDF remediation as a blind or visually impaired person who cannot use the mouse? If anyone has personal experiences they can share about PDF remediation I would love to hear that as well.
> 
> I am not sure if this is quite on the level of a programming question, but it is markup; I am hoping this question is on topic. Any input or assistance is always appreciated!
> 
> Sincerely,
> Cory
> 



More information about the accessibility mailing list.