MED-25Recommended
Make generated PDFs accessible
Generate every PDF that people read as a tagged PDF with a title, a document language, headings, a reading order, image descriptions and embedded fonts. Validate each document type against PDF/UA in CI.
How to do it
A PDF without tags reads to a screen reader as one stream of words, or as nothing. Invoices, tickets and confirmations are part of the service under the European Accessibility Act, as Meet the European Accessibility Act as a legal duty says. PDF/UA is ISO 14289, and its second part from 2024 builds on PDF 2.0. The W3C lists PDF techniques for meeting WCAG. Embed fonts for every script you print, so a name in Arabic or Chinese does not turn into empty boxes. Turn on tagging in the renderer, as Use Playwright or WeasyPrint to turn HTML into PDF shows. Then check the output with a PDF/UA validator such as veraPDF.
How to check
CI renders one sample of each document type and runs a PDF/UA validator on it with 0 failures. A text extractor reads a customer name in Arabic and one in Chinese from the sample as text.
Sources
Related rules
- AXS-54 Publish tagged PDFs that pass PDF/UA in Accessibility
- CMP-52 Meet the European Accessibility Act as a legal duty in Compliance and governance
- STK-84 Use Playwright or WeasyPrint to turn HTML into PDF in Software choices
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/files-and-media/generated-documents/accessible-pdfs">Agent Wranglers files and media playbook</a>. In code you write, add a comment next to it with the same link.