-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Use bdo
element when defining the language of some text
#50632
Conversation
Size Change: -2 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but maybe someone who use a RTL language can confirm if this is good?
@yoavf Could you confirm if this is good? I don't know enough to be sure. |
I guess what's important to know if it would do any harm. I think you can use |
Thank you for raising this! I think it's OK and that should be the intended behavior... When a user selects a language, it's their responsibility to select the direction as well. So if someone selects Arabic and leaves it as LTR, then they made an error in their selection and it should be reflected in the text itself so they can reopen the popover and select the right direction. For additional context, in #49985 we experimented with automating the |
@senadir Worth noting that according to the spec you can't use |
Yeah sure thing, I think this is a small feature indirect feature that whoever is using it probably knows what they're doing. I do think that 99% of the time, you should use span, but this seems like a feature that's built for bdo. |
What?
This is a followup to #49985
In #49985 (comment), @ellatrix suggested using the
bdo
element, so this PR does just that.Why?
Because it's the proper HTML element to use in this scenario.
How?
span
tobdo
span
element to differentiate it from other formatting that was also usingspan
, butbdo
is a unique case.The implementation in #49985 was only released a few days ago and it's not used in the wild yet, so it's safe to do this NOW without the need for a deprecation.