Skip to content
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

ENH: Add alt text to images #1699

Closed
domoritz opened this issue Mar 10, 2023 · 7 comments
Closed

ENH: Add alt text to images #1699

domoritz opened this issue Mar 10, 2023 · 7 comments
Labels
is-feature A feature request PdfWriter The PdfWriter component is affected

Comments

@domoritz
Copy link

I would like to programmatically add alternative texts for screen readers to images. Is that possible right now?

The way the feature could be used is to identify a node (using some kind of object id) and then adding an alt text with a method call on the node. Then one would write the new PDF document back to a file.

@MartinThoma
Copy link
Member

I don't know if the pdf format supports it. Feel free to add this feature

@domoritz
Copy link
Author

It's definitely supported but I don't know how exactly. Acrobat has a feature to add alt texts in the accessibility tools. It usually requires that a document is tagged.

Unfortunately I don't have the time to add this feature right now and I would need more guidance on how to add it.

@pubpub-zz
Copy link
Collaborator

pubpub-zz commented Mar 11, 2023

I did a quick search on internet and found this page:
https://www.umaryland.edu/cpa/toolbox/website-manual/accessibility/instructions-for-pdfs/working-with-alternate-text-in-acrobat/

It looks like alternative text depends on tagging. To confirm that, can you share a PDF file with such alternative texts?

@domoritz
Copy link
Author

https://dl.acm.org/doi/pdf/10.1145/3517428.3544796 has alt texts for the images. The document looks tagged to me.

@MartinThoma MartinThoma changed the title Add alt text to images ENH: Add alt text to images Mar 12, 2023
@MartinThoma MartinThoma added is-feature A feature request PdfWriter The PdfWriter component is affected labels Mar 12, 2023
@lukszam
Copy link

lukszam commented Dec 6, 2023

Hi, thanks for the great work! Is there any roadmap for supporting this feature?

@stefan6419846
Copy link
Collaborator

No, there is no general roadmap for the pypdf issues, but anyone interested in this is free to give it a try and open a corresponding PR.

@stefan6419846
Copy link
Collaborator

I am going to close this in favor of #1168 for now. Contributions are still welcome to get started with reading/writing tags.

@stefan6419846 stefan6419846 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-feature A feature request PdfWriter The PdfWriter component is affected
Projects
None yet
Development

No branches or pull requests

5 participants