Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF fail some accessibility checks #609

Open
MrDeshaies opened this issue Mar 1, 2021 · 2 comments
Open

PDF fail some accessibility checks #609

MrDeshaies opened this issue Mar 1, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@MrDeshaies
Copy link
Contributor

The generated PDF fail some accessibility checks. Attached are the reports from FoxIt. The primary issue they need the proper tagging structure.
foxit pdf accessibility report.pdf

(reported by Andrew Wan, ESDC. Thanks!)

@MrDeshaies MrDeshaies added the bug Something isn't working label Mar 1, 2021
@MrDeshaies
Copy link
Contributor Author

This one is not straightforward. Pdf is generated with a chain of libraries: html-to-pdfmake, pdfmake, and then pdfkit. It seems PDFkit has fairly good support for accessibility, but it requires the code to be written a certain way to provide metadata and properly tag the structure of the document.

Unfortunately, pdfmake lacks support for accessing the accessibility features of pdfkit; it does not transfer certain required metadata (lang, displayTitle, tagged, which need to be set), and it offers only rudimentary support for tagging the doc sections (basic table of content or toc support).

That leaves us with two options... 1) enhance html-to-pdfmake and pdfmake to properly handle accessibility (non trivial), or 2) recommend users use a PDF editor after generation from AIA tool to complete the tagging and fix accessibility issues (which only takes 2 minutes per PDF with certain a certain editor common in GoC). I'll go with 2 in the short term, until 1 can be implemented.

@MrDeshaies
Copy link
Contributor Author

In case I forget or someone asks: Chrome's Print / Save as PDF does not create accessible PDFs. I tried, and Foxit finds more accessibility issues than with the PDFs the AIA generates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant