5

The PDF files I create from LaTeX fail any accessibility tests, as the final document is not tagged in any way. I know I can add tags directly to a PDF document with Adobe Acrobat; also with a tagging/accessibility package for LaTeX.

But I'm wondering which package reflects best the state of the art, and is the easiest to use? I don't want to have to rewrite too much of several hundred pages of documents. There seem to be several competing packages available, but I don't want to have to put a lot of work into using one to find that it becomes inadequate after a while.

7
  • 2
    ConTeXt. Although, there are some efforts for LaTeX as well, see tagpdf. Jun 22, 2020 at 5:48
  • 1
    Yes, thanks - I've used ConTeXt, but in the end I had to go back to LaTeX as there were some things in LaTeX not (at that stage) in ConTeXt. Also - I don't want to have to rewrite all my files into a new format!
    – Alasdair
    Jun 22, 2020 at 6:41
  • Even if there is a solution that doesn't require moving to ConTeXt, you'll still have to rewrite large parts of your file, because accessibility has quite some special requirements on how the content is input. It requires lots of manual annotation. Jun 23, 2020 at 3:06
  • Accessibility is not only tagging. It is also about correct metadata. For this requirement I think hyperxmp is the most recent and sophisticated. In terms of PDF/A, conformance «a» (but not PDF/UA) also colour management is a requirement. Right now, the necessary OutputIntent is best included manually, see an example. Since tagpdfis rather labour intensive you may consider the Acrobat approach.
    – tanGIS
    Jun 23, 2020 at 9:15
  • Thank you all: I'm still a bit confused - should I move to ConTeXt (I can translate LaTeX to ConTeXt using pandoc), or LuaLaTeX, or both? I've just taken a leading role in my University's accessibility management, and clearly I would like my own documents to be models of good practice. I can also use HTML and MathJax, but my preference is a single PDF document.
    – Alasdair
    Jun 25, 2020 at 0:31

2 Answers 2

6

The only publicitely available LaTeX-package that currently actually works is as far as I know tagpdf [Disclaimer: I'm the author]: It's documentation isn't perfectly tagged but good enough to pass the PAC3 test.

But tagpdf hasn't been written as a user package but to allow experiments and tests and to help to identify missing interfaces in the kernel and in packages. It can change at any time in incompatible ways and it requires some skills to use it.

The package is part of a project to add accessibility support to LaTeX. I wrote an article about the general plan in Arstechnica (https://www.guitex.org/home/images/ArsTeXnica/AT028/fischer.pdf). The article has also been reprinted in the newest tugboat (https://www.tug.org/TUGboat/tb41-1/tb127fischer-accessible.pdf).

Side-remark: You tagged your question with pdftex. With pdftex tagging of running text is much more difficult than with luatex.

1
  • 1
    Thank you - I've looked at tagpdf, but it is said to be "not ready for production". And you make that point yourself above. It looks like I might need to learn to use LuaTeX, about which I currently know nothing whatsoever.
    – Alasdair
    Jun 25, 2020 at 0:27
2

You may see some older discussion of the accessibility package.

accessibility was developed and published back in 2007 as a proof of concept for some of the KOMA document styles. I got hold of the files from the author in 2019 and took over maintenance with her permission. I tidied up the package enough to get it to CTAN, but didn't update the functionality. I also published it to GitHub to get some feedback on it.

It seems to have worked well in 2007 for a few test cases. Unfortunately it now fails every test case, and it looks like needing some serious efforts to fix.

Because of this I no longer think that accessibility is fit for purpose. As you've seen I've recently asked CTAN to add a disclaimer to the catalog entry for it. The Github code repository is also tagged as "not ready for production". So, don't try it unless you are curious! If anyone reading has coding skills and would like to contribute to the package, please leave an issue there (or, just fix it...).

There's another issue here. Tagging and accessibility is deeply linked to the semantic structure of the document. There's a need to separate the the visible structure in the output PDF (that which a sighted person would recognise from heading numbers and good use of visual clues) from the document content (visible as the tagging tree in adobe, for example) so that machine readers can use it. Ideally this would be done within the core latex code so that a solution is usable by every package, not as a sticking-plaster on top where every change to a package breaks it.

This need for a broadly applicable solution is why the approach being pursued by @Ulrike and the core team is much more likely to lead to a sustainable solution. Also there's stuff to be rescued from accessibility, there's some great ideas in tagpdf, and the whole thing has to not break the rest of 'tex. Not much to ask! So.. currently I'm thinking on ways to get some resources for this and will be coordinating with the team. All suggestions are welcome!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.