Bilingual documents: unable to declare language on foreign language passages #2814
Closed
Ovgodd
started this conversation in
Ideas & Enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Observed behavior
When a document contains passages written in two different languages, it is not possible to declare the language on each portion of text. Passages in a foreign language cannot be tagged with the corresponding lang attribute, and passages in French cannot be explicitly assigned lang="fr" either.
Expected behavior
The editor must allow the user to define the language of a selected text passage, so that the lang attribute is applied to the corresponding HTML element with the correct language code (e.g. lang="fr", lang="en", lang="de", etc.). Language changes in a document must be reflected in the generated markup.
Steps to reproduce
Create a document containing passages in French and passages in another language.
Select a passage in a foreign language.
Look for an option to declare the language of this passage.
Observe that no such functionality is available.
Possible solution
Add a "Text language" option in the formatting menu or in a context menu, which applies the lang attribute to the or block element surrounding the selection:
Before:
Voici un exemple. This is an example.
After:Voici un exemple. This is an example.
Impact
A blind user navigating with a screen reader reads a bilingual document. The screen reader renders passages in a foreign language with the French speech synthesis voice, producing incorrect and incomprehensible pronunciation. The user cannot access content in a foreign language under normal reading conditions.
Beta Was this translation helpful? Give feedback.
All reactions