diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.63k stars 1.16k forks source link

Add options to validate WCAG 2.0 a11y requirements #1115

Open rnacken opened 3 years ago

rnacken commented 3 years ago

Is your feature request related to a problem? Please describe. I want PDFs that will pass an WCAG 2.0 a11y test (see https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/pdf.html)

When I try to validate the accessibility of a generated PDF with a tool like PAC 3 (https://www.access-for-all.ch/ch/pdf-werkstatt/pdf-accessibility-checker-pac.html), or http://checkers.eiii.eu/en/pdfcheck/ some issues come up that can nnot be taken care of with the current set of options provided by the @react-pdf API: image Specifically what seems to be missing is:

Describe the solution you'd like

Furthermore, these other issues popped up while validating with PAC 3:

Describe alternatives you've considered Currently, I believe a valid alternative to a11y-validated PDFs is to provide a link as the very first focusable element in the PDF that will link back to a webpage that does contain all the a11y features.

Additional context

siren commented 3 years ago

Natural language can be set like this:

<Document language="fi">

rnacken commented 3 years ago

@siren I don't know about that - from what I can tell in the source code, language does not seem to be a valid prop for Document: image

Adding it also does not seem to change anything for the validation tools.