You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proper bidirectional text navigation, editing, and typing is essential for speakers of Right-to-left languages.
Unicode specifies Unicode Bidirectional Algorithm (UBA) for programs to automatically detect the directionality of each paragraph. Although it is properly implemented in GUI toolkits such as GTK and QT, unfortunately, this algorithm is still not implemented in many major browsers.
All of the previously listed issues are related to text fields and the alignment of text within them. However, this should also apply to HTML rendering, meaning that if two paragraphs in HTML source are:
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
</p><p>
قِفَا نَبْكِ مِنْ ذِكْرَى حَبِيبٍ ومَنْزِلِ، بِسِقْطِ اللِّوَى بَيْنَ الدَّخُول فَحَوْمَلِ. فَتُوْضِحَ فَالمِقْراةِ لمْ يَعْفُ
</p>
Then the browser would apply UBA on the second paragraph so that it renders it the same as it renders:
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
</p><pdir="rtl">
قِفَا نَبْكِ مِنْ ذِكْرَى حَبِيبٍ ومَنْزِلِ، بِسِقْطِ اللِّوَى بَيْنَ الدَّخُول فَحَوْمَلِ. فَتُوْضِحَ فَالمِقْراةِ لمْ يَعْفُ
</p>
Here is for example how it is rendered in UBA-supported text editor (GTK):
Of course, the dir HTML attribute would still stay as a way to force text direction, but by default, applying UBA would be more close to what the end-user would expect.
I hope that by adding Bidirectional Text Support as a WCAG standard, that'll push browsers to implement it.
I'd suggest taking this to https://github.com/w3c/wcag3 rather than here, as there won't be any new requirements added to 2.x. I can see how this conceptually is similar to the requirement for programmatically determined language of documents, though it would be good to demonstrate first how this is something that affects people with disabilities specifically (and isn't just a general code quality issue not specific to accessibility requirements)
Proper bidirectional text navigation, editing, and typing is essential for speakers of Right-to-left languages.
Unicode specifies Unicode Bidirectional Algorithm (UBA) for programs to automatically detect the directionality of each paragraph. Although it is properly implemented in GUI toolkits such as GTK and QT, unfortunately, this algorithm is still not implemented in many major browsers.
All of the previously listed issues are related to text fields and the alignment of text within them. However, this should also apply to HTML rendering, meaning that if two paragraphs in HTML source are:
Then the browser would apply UBA on the second paragraph so that it renders it the same as it renders:
Here is for example how it is rendered in UBA-supported text editor (GTK):
Of course, the
dir
HTML attribute would still stay as a way to force text direction, but by default, applying UBA would be more close to what the end-user would expect.I hope that by adding Bidirectional Text Support as a WCAG standard, that'll push browsers to implement it.
Resources and readings:
The text was updated successfully, but these errors were encountered: