react-pdf
react-pdf copied to clipboard
[Accessibility] User is unable to access/read the text using screen reader
Before you start - checklist
- [x] I followed instructions in documentation written for my React-PDF version
- [x] I have checked if this bug is not already reported
- [x] I have checked if an issue is not listed in Known issues
- [x] If I have a problem with PDF rendering, I checked if my PDF renders properly in Mozilla Firefox
Description The screen reader doesn't read out the text content of the pdf file being loaded.
Steps to reproduce
- Open pdf
- Use screen reader to navigate to the content inside pdf.
Expected behavior Screen reader should read out the information.
Additional information If applicable, add screenshots (preferably with browser console open) and files you have an issue with to help explain your problem.
Environment
- OS version: 1903 (OS Build: 18362.175)
- Browser: Microsoft Edge 44.18362.1.0
- Screen reader: Narrator.
- React-PDF version: 3.0.6
- React version: 16.5.2
- Webpack version: 4.41.2
By default, text layer should be enabled (renderTextLayer
should be true
). Is that not the case?
Is other accessibility Metadata preserved like semantic structure for headings, form fields, ordered/unordered lists, tables, etc.? Having the text layer is not sufficient for meeting user needs for accessibility all up.
I believe we don't have such information to play with. If you know the exact PDF file being rendered you can create a custom renderer that creates headings e.g. based on font size, but that seems like a horrible idea to me...
Note to self: there's includeMarkedContent option in page.getTextContent. We would need to handle these items somehow though.
Might also be fixed by #944.
Resolved in #1498.