Introducing the {pdfcheck} R package for checking the accessibility of PDFs
Are the PDFs you're creating accessible? Can someone using a screen reader navigate them? Is the color contrast sufficient for people who are colorblind?
These are questions we've been getting a lot from our consulting clients at Clarity Data Studio. And honestly? When we reviewed our own PDFs, we found there wasn't a really great tool to check accessibility and give us actionable steps to improve. So we decided to build our own.
It's called {pdfcheck}, and it's an R package that helps you check your PDF documents for accessibility. My consultant Joseph Barbier did most of the work on this (with a little input from me).
Under the hood, {pdfcheck} uses a command line tool called veraPDF, which checks PDFs for accessibility issues. The problem is that veraPDF’s messages are super technical and hard to understand. {pdfcheck} takes that technology and makes it much more user-friendly.
Here's what you can do with it:
Install VeraPDF automatically with a single function (install_verapdf()) - Check if your PDF is compliant with the
is_pdf_compliant()function - Generate a full accessibility report with theaccessibility_report()function
The accessibility report shows you:
How many rules passed and failed - All the issues that need your attention - Simple explanations of what's wrong (we used AI to translate the technical language) - Specific fixes you can implement (like how to add alt text to images in Quarto)
I demonstrate all of this in a quick video walkthrough of {pdfcheck}.
Full disclosure: the issue and fix descriptions aren't perfect yet. We're going to bring in some experts to help us improve them. But hopefully it's a solid first attempt at making PDF accessibility more approachable.
I'm also happy to report that we've successfully made fully accessible PDFs for our work with the International Vaccine Access Center at Johns Hopkins University.
We used Quarto, Typst, and R to create reports that pass all accessibility checks. The key was using typst 0.14, which has made huge improvements to accessibility (unfortunately, this version isn't in Quarto yet, but will be soon).
Good luck making accessible PDF reports, and if we can support you along the way, don't hesitate to reach out!
Sign up for the newsletter
Get blog posts like this delivered straight to your inbox.
You need to be signed-in to comment on this post. Login.