by ducaale on 8/23/23, 10:26 AM with 99 comments
by drex04 on 8/23/23, 2:10 PM
Note also that there's currently a regression in Chrome that affects how RTL text is rendered in inputs with dir='auto'. They just shipped a fix though so it should be included in the next release.
by pharrington on 8/23/23, 2:47 PM
by TacticalCoder on 8/24/23, 12:24 PM
There is a world outside the US but you don't have to support it, depending on what your site does. I'm not american. I'm not even a native english speaker. And 99% of the sites I go to are perfectly fine if they don't allow neither usernames nor posts containing RTL characters.
If it's not solved at the browser or OS level, I've got about zero obligation to support this.
And, no, this is not about oppressing minorities.
by rendall on 8/23/23, 8:29 PM
I have something to tell you that will help you solve your problem, but you should sit down first, because it's probably going to make you sad...
by amluto on 8/23/23, 2:51 PM
I assume this is just the Unicode bidirectional algorithm failing, as it is wont to do. I imagine that a special cased algorithm that understood that HTML tags (the stuff between < and > inclusive) should render as atomic things, internally LTR, but without imposing their direction on surrounding characters.
In this example, the algorithm should be willing to switch direction in the middle of the sequence “.<“
by ssddanbrown on 8/23/23, 2:54 PM
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical...
by groby_b on 8/23/23, 3:10 PM
If I search for textarea and BiDi text, in pretty much all variations I can think of https://www.w3.org/International/talks/1602-oman is one of the top links.
And right in there, the "What if you don't know the direction in advance" section, https://www.w3.org/International/talks/1602-oman/#advance
I assume the problem is that the author doesn't really know the space, and so didn't even know that "BiDi" is the right search term here. (For "bi-directional text", since you don't want to specify a writing direction)
I don't even fault them for thinking "the results are wrong" - they aren't, if you search for RTL they're the right answer. But you won't know that until you know the space a bit better. This highlights a problem with relying on the Internet for answers - it doesn't know what you don't know. Sit down with anybody who's dealt with BiDi for a while, and one of their first questions will be "Do you mean RTL or BiDi"?
So, if you can, ask people, not software. Especially if you don't know the space.
by bsmth on 8/23/23, 3:14 PM
by jesprenj on 8/23/23, 3:08 PM
by ketanmaheshwari on 8/23/23, 3:29 PM
by andrewmcwatters on 8/23/23, 4:36 PM
A number of other automatic behaviors exist simply when you change your primary language, and this is one of them that should change by default. You'll know this by experience if you speak another language and occasionally flip your primary language over. All the sites you browse start respecting your lang and locale settings.
Other technical or format-specific inputs should retain their relevant direction.
by javajosh on 8/23/23, 7:18 PM
by miduil on 8/23/23, 2:53 PM
by lakomen on 8/23/23, 11:18 PM
by bjoli on 8/24/23, 6:51 AM
it is one of maybe 12 global non-event attributes.
by qingcharles on 8/24/23, 12:29 AM
http://khumuunbichig.montsame.mn/index.php?command=newsall&r...
by distantsounds on 8/23/23, 3:16 PM
mods, pls fix the title.
by londons_explore on 8/23/23, 2:25 PM
Frameworks and browsers should be designed that if you totally ignore rtl support, the browser/framework just does some usable default.
Just like if you don't set a font size, the browser chooses one for you. Or if you don't specify the background color, one is chosen for you.
by divbzero on 8/23/23, 6:04 PM
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...
What I don’t understand is why dir="auto" isn’t set as the default value, allowing browsers to choose text direction based on the lang attribute or the text content.
by whywhywhywhy on 8/23/23, 3:08 PM
by ssdspoimdsjvv on 8/23/23, 3:47 PM
by bad_alloc on 8/23/23, 5:34 PM
by crazygringo on 8/23/23, 5:24 PM
Why isn't it done by default by the browser? What is the browser default? (Strangely, MDN docs don't seem to indicate.) And if it's not already this, why not?
by wnoise on 8/23/23, 3:31 PM
by tracker1 on 8/23/23, 4:55 PM
by Pxtl on 8/23/23, 4:32 PM