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

Rich Text images' alt text is not being recognized by "extract_strings". #808

Open
ho-tsl opened this issue Jun 26, 2024 · 1 comment
Open

Comments

@ho-tsl
Copy link

ho-tsl commented Jun 26, 2024

Hey there,

Currently, the extract_segments function does not recognize image alt texts inserted by a RichText block. This is an important accessibility issue that I would like your help to solve.

Is it possible to update the "extract_strings" function to extract these texts to be translated?

@zerolab
Copy link
Collaborator

zerolab commented Jun 28, 2024

Hey @ho-tsl,

Feel free to give it a try. The segment extraction happens in

elif isinstance(field, RichTextField):
with the strings extraction in extract_strings as you point out.

It should be possible to do so. You may want to have a look at https://docs.wagtail.org/en/stable/extending/rich_text_internals.html#data-format for how Wagtail saves things like images/docs (and URLs) internally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants