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

Accessibility issue on partial translation #516

Open
JohnXLivingston opened this issue Aug 30, 2024 · 1 comment
Open

Accessibility issue on partial translation #516

JohnXLivingston opened this issue Aug 30, 2024 · 1 comment

Comments

@JohnXLivingston
Copy link

Hello,

I'm using po4a to translate markdown pages, then i'm using Hugo to generate a static website.

I have an accessibility issue for partial translations: Hugo adds a lang attribute on the page, and i can't change its value.

When the translation is incomplete (or completely empty) we have - for example - lang="it" on the webpage, but the content is in english.
This breaks screen readers (for blind people), as it tries to read english words as italian.

It would be nice to have an option to add <span lang="en"> for all non-translated strings in the markdown file.

Note: this solution will not work for the frontmatter, only for the markdown content. For the frontmatter i have no idea yet. But it would be a great start to have the span solution to begin.

@Fat-Zer
Copy link
Contributor

Fat-Zer commented Oct 28, 2024

I suppose, it shouldn't be too hard (famous last words) to add an option to provide some decorators for untranslated text.

Though, I'm a bit hesitant about the exact user-facing config syntax of all this. And unsure how meticulous we should be about filtering what strings the decorators should apply to.

@mquinson, your thoughts?

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