react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

[Accessibility] User is unable to access/read the text using screen reader

Open mayukh-ms opened this issue 4 years ago • 4 comments

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

  1. Open pdf
  2. 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

mayukh-ms avatar Jan 20 '20 18:01 mayukh-ms

By default, text layer should be enabled (renderTextLayer should be true). Is that not the case?

wojtekmaj avatar Jan 20 '20 19:01 wojtekmaj

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.

bjmcc1984 avatar Nov 04 '20 18:11 bjmcc1984

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...

wojtekmaj avatar Nov 05 '20 07:11 wojtekmaj

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.

wojtekmaj avatar Mar 21 '22 05:03 wojtekmaj

Resolved in #1498.

wojtekmaj avatar Jun 06 '23 20:06 wojtekmaj