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

Feature: Be able to provide structural information to improve accessiblity

Open jbovenschen opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. Currently react-pdf does not expose any way to make the PDF more accessible while PDFKit the underlying library has some options to provide more structural information for visually impaired users who rely on screen readers/text-to-speech engines/vocalisation.

With PDFKit you are able to provide structural information as described in http://pdfkit.org/docs/accessibility.html.

Describe the solution you'd like

What I would like to see is a way to provide the View and Text primitives provided by react-pdf with the structural information. In react-native this can be achieved by properties like accessibilityRole.

Describe alternatives you've considered Another solution could be providing more primitive elements for the different types of structural information, but if we expose those on the View and Text primitives a user could create those by wrapping the primitive components.

Additional context @diegomura What is your opinion on this matter and the proposed solution?

jbovenschen avatar May 03 '21 11:05 jbovenschen

Hey Jaco! Good to hear from you!

I'm 100% onboard with the described solution. accessibilityRole seems like a good approach to me

diegomura avatar May 03 '21 13:05 diegomura

I will try to look into it, and hopefully I can make a PR for this feature. Would be nice if react-pdf has a way to support the more advanced usages of pdf-kit so this would be a first step.

jbovenschen avatar May 17 '21 16:05 jbovenschen

It looks like the version of pdfkit shipped by react-pdf doesn't include any of the marking mixing functionality from the upstream pdfkit. Is this correct? I'm looking at what it'd take to get a11y working properly with react-pdf and am trying to grok the current scope of work to be done.

cheald avatar Jun 09 '22 16:06 cheald

Curious if any progress has been made on this. I do see the initial fork from pdfkit came well before accessibility support was added, but unsure what type of work would need to be done to incorporate those changes here.

Lack of basic accessibility support is a hard blocker for me to use this otherwise great library that I much prefer to pdfkit.

swipht1991 avatar Feb 08 '23 00:02 swipht1991

@jbovenschen, has there been any progress on this? I am also interested in creating accessible and ADA Compliant PDFs with this library as opposed to pdfkit alone.

ryansuleski avatar Apr 18 '23 22:04 ryansuleski

It would seem the development on this feature is stale, per no response from @jbovenschen.

@diegomura, is this on any planned roadmap for the library? If not, are you still open to integrating pdf accessibility into react-pdf? Would you be accepting of a PR integrating these features?

ryansuleski avatar Apr 24 '23 19:04 ryansuleski

bumping this thread, @diegomura is this a feature you would accept a PR for?

swipht1991 avatar Jul 06 '23 18:07 swipht1991

Also bumping this -- this is something we definitely need and will have to switch to other PDF generation tools without it.

GVanderLugt avatar Aug 25 '23 18:08 GVanderLugt

Any updates on this? @diegomura
@swipht1991 do you find any work around ?

rijine avatar Jan 27 '24 09:01 rijine