# LaTeX accessibility

Does anyone know of any LaTeX modules that makes the pdf output generated by pdflatex Americans with Disabilities Act of 1990 (ADA)/Section 508 compliant?

Specifics:

• With regard to math. One simple solution is to embed the latex equation as an alt tag. Simpler, and IMO better than translating to MathML.

• With regard to graphics. I use dot to generate the graphics. A simple solution here is to embed the .dot file as an alt tag for the figure.

Is there any way to generate alt tags with pdflatex?

-
–  Seamus May 28 '11 at 11:55
The main concern here is making the contents of a file generated by pdflatex "accessible": Are the contents accessible to a person with disabilities? An image almost certainly is not. A typeset math equation may or may not be. Some PDF readers do a better job than others, but they all stumble on some symbols and on anything but the simplest of typesetting. Superscripts or subscripts ofttimes are not accessible. This article from six years ago gives some background to the problem: cio-dpi.gc.ca/clf-nsi/inter/inter-01-02_e.asp –  David Hammen May 28 '11 at 12:20
My idea is to regurgitate the contents of an equation environment (or similar) as an alt tag in the PDF. An alternative is to translate the latex math to MathML and make that the alt tag. Too much work, and the visually impaired people I work with technically would rather see latex math than MathML as an alt tag. As for graphics, there is no generic solution, but for graphics generated from a graphviz file there is a simple answer: Regurgitate the .dot input as an alt tag. That .dot file is after exactly what was used to generate the graphic. –  David Hammen May 28 '11 at 13:08
@AndyClifton (I've removed mine as well) I completely agree with you on that. Indeed, my objection is to the suggestion that the TeX that I write be made the alt text. It's just that I was objecting to that as an author, not as a reader. –  Andrew Stacey Sep 18 '13 at 18:04
@AndyClifton - One of the many beauties of TeX/LaTeX is that it separates content from appearance. As an author, I shouldn't care how things appear. Making it look nice -- that's the engine's job. Ideally, making it sound nice should also be the engine's job, including equations. In this ideal world, the engine would automagically construct a default alt-text for equations. The author should only need to get involved when that default isn't adequate. –  David Hammen Oct 1 '13 at 13:01

Try the `\pdfcomment` package. There's an option to add a tool tip to the PDF using `\pdftooltip{item}{tooltip}`, where the item can be a float (e.g. `\pdftooltip{\includegraphics[]{}}{description of my figure}`).

The overall process that I've settled on to produce 508-compliant documents is to

1. Produce a high-quality PDF from LaTeX which includes all of the tooltips
2. Run the PDF through the tagging tool that is provided by Adobe Acrobat X (Adobe how-to).
-

There is an German Diplomarbeit "Accessibility-Erhöhung von LaTeX-Dokumenten" by Babett Schalitz, written in German language in the year 2007. In English the title is something like: "Better accessibility for LaTeX documents". A German "Diplomarbeit" is more than a bachelor. She wrote a prototype package `accessibility.sty`. Unfortunatly is the given url http://www.babs.gmxhome.de/da_pdftex/accessibility.sty yet not reachable (the url http://www.babs.gmxhome.de/download/da_pdftex/accessibility.sty works now again, so that the package is downloadable). The link to documentation (the thesis) does not work ...

-

To the best of my knowledge, (1) Ross Moore is working on this and (2) nothing is production ready yet.

but coming soon, it will be. http://www.tug.org/tug2009/preprints/moore.pdf

Update Ross Moore's published paper is at http://www.tug.org/TUGboat/tb30-2/tb95moore.pdf

-
That's the state of the pdflatex world. In ConTeXt MkIV it is production ready. –  Martin Schröder Jun 3 '11 at 21:40

This is not so much an answer to my question as it is a refinement of what needs to be done. It is too long and too heavily formatted to fit in as a comment.

The challenges in making a document accessible are

• Graphics. Graphics are inherently inaccessible as-is. One way of making a graphic accessible is to provide an adequate description of the graphic in the main body of the document. Another is to provide some alternative text (PDF and HTML both have alternative text capabilities) that somehow make the graphic accessible. While the LaTeX machinery obviously cannot provide that explanatory text, it should provide the authoring tools that enable a document author to provide an alternative explanation.
• Tables. Tables can be quite accessible as-is. Whether or not they are depends on

• The mechanism used to create the table: Are the tables typeset by painting the cell contents at a certain place on the page or are they typeset using some construct? (I don't know how pdflatex generates tables. I'll look into that.)
• Whether the table is overly-tuned for sighted readers. "Professional" tables that use \multicolumn to conjoin columns, extra vertical space to separate items in a table, etc., are visually appealing but are not quite as accessible as plain old vanilla tables.
• Equations. My thought is to capture the LaTeX code used to make the equation as the alternative text. This is exactly how wikipedia.org makes the mathematical equations in some wikipedia article accessible.
• Ligatures. This one might well be the toughest challenge of all. Those ligatures on which Knuth spent so much effort come across as an unreadable character in a PDF document generated by LaTeX. The problem I see is that the treatment of ligatures is so very deep inside TeX itself. To solve the problem, words that contain ligatures need to have an ActualText tag that spells the word out as-is in text.
-
Regarding ligatures: I sent a request for comments to the authors of JAWS (one of the more popular readers) about how to make ligatures accessible with their software. If I get a response from them, I will ask them to join in on the discussion in this question. –  David Hammen Jun 2 '11 at 13:11
This isn't a discussion forum and isn't the appropriate place for such. I think that these matters are extremely important and completely agree that the current state of affairs is inadequate, but here is not the place to discuss that. Here is where to find out what the current state of affairs is (to the best of someone's knowledge), and to find out how to do a particular thing. –  Andrew Stacey Jun 2 '11 at 13:22
The ligatures as-is text could also fix copying text from pdfs, which copies ligatures right now. –  Neil G Aug 6 '12 at 15:55
I thought the problem with ligatures was that PDF and/or PDF readers don't have a concept of ligatures as presentation forms for sequences of characters? At least, I'm not aware of any ambiguous ligatures commonly used with TeX. Hyphenation, on the other hand, I suspect the TeX engine/format itself really would need to supply more information about ... –  SamB Jan 23 at 21:10