-
-
Notifications
You must be signed in to change notification settings - Fork 882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve accessibility for screen reader users. #831
Comments
Do you have a sample PDF that has such properties? I'll have a look on what PDF.js offers. Although I don't recall being provided with suggested tag name. Also would be great to check if text layer contains these elements when this PDF is opened with Firefox. If not, then probably it's not possible at the moment. If yes, however... |
Hi Wojtek,
Here a full accessible PDF document you can use for your tests.
If you can't do anything to improve the system, please update me with
details (which file in React is involved, why...) and I will try to contact
the React team.
Thank you a lot for your time.
Alain
*__________________________________________________________________________*
*Alain Gravelet*
122, rue Saint-Philippe
Montréal - QC - H4C 2T7
Canada
Cellulaire : +1 (514) 561-5900
www.gravelet.net
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_1039261954527672469_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Le mer. 18 août 2021 à 15:37, Wojciech Maj ***@***.***> a
écrit :
Do you have a sample PDF that has such properties? I'll have a look on
what PDF.js offers. Although I don't recall being provided with suggested
tag name.
Also would be great to check if text layer contains these elements when
this PDF is opened with Firefox. If not, then probably it's not possible at
the moment. If yes, however...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#831 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVIGN5LMRGTQHEW3CYMPXF3T5QDWVANCNFSM5CMQZ4AA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
|
Hello again @wojtekmaj :) I took a look at PDF.js and it seems there is an optional parameter that can be passed to getTextContent as such: I tested this on the PDF.js viewer demo and it does seem to render some more accessible structure in a separate layer. It is still spans but it adds some roles and other attributes to help out screenreaders. It's definitely not perfect, but it would be nice to have as an option. I will probably be implementing (or at least investigating) this in our internal react-pdf fork so I will update this ticket if I have interesting results. Relevant links: Tagged document from WCAG: |
After doing a small (and ugly) internal PoC, this is definitely possible. The key parts in the PDF.js PR linked in my above comment are PDF.js viewer renders a structure as follows:
I'm not 100% sure why they went in this direction as opposed to rendering the actual tags in the text layer since they are accessible through |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days. |
This issue was closed because it has been stalled for 14 days with no activity. |
Hi,
The
span
method is already much better than a simple image, thank you for that.But we could do much more better.
This idea will work if the PDF file is already accessible, I mean tagged with semantic tags:
H1, H2, P, UL/LI, buttons
...In that case, replacing the
span
by the correct semantic tags will allow blind end-users to navigate easily into the document alternate, which can be very complicated, especially when documents have multiple pages.Thank you.
The text was updated successfully, but these errors were encountered: