diegomura / diegomura/react-pdf
Add options to validate WCAG 2.0 a11y requirements
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 1.3k
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 52
Description
**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:

Specifically what seems to be missing is:
- Bookmarks
- Natural language
- Missing metadata
**Describe the solution you'd like**
- I'd like to have the extra option for the `Documents`: `Natural language`
- I'd like the PDF to render extra metadata: XMP with the title, as well as PDF/UA identifier
- On `Text` component, the option of `DisplayDocTitle`
- I'd like to be able to add bookmarks (mentioned here already, but not in the context of a11y: https://github.com/diegomura/react-pdf/issues/237)
Furthermore, these other issues popped up while validating with PAC 3:
- "Link" annotation is not nested inside a "Link" structure element
- `Link` can not have an alternative description
- The document can't be marked as `tagged`, but this will probably mean a larger overhaul of components to control how you can navigate through the document with tool-assistance. Just marking the doc as 'tagged' will not be enough
**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**
Contributor guide
Assessment
This issue has not been assessed yet.