InputControl/TextControl: Force direction to LTR for certain fields #65893
Labels
l10n
Localization and translations best practices
[Package] Components
/packages/components
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
For example, in the
email
andurl
fields, the text direction is usually expected to beltr
.There is a style in WordPress core that will change the direction to ltr:
https://github.com/t-hamano/wordpress-develop/blob/a51f2e45c4a76878dbd0ab90782d44a07b29d13a/src/wp-content/themes/twentytwentyone/assets/sass/04-elements/forms.scss#L57-L62
However, this style does not necessarily apply to the block editor.
For example, in the Embed block that uses the
InputControl
with aurl
type, the direction is RTL, as shown below:What is your proposed solution?
As with core, if the type attribute is
url
oremail
, I suggest addingdirection: ltr
.However, there seem to be various approaches to making form fields RTL-compatible. Please refer to the following article:
Interface localisation: adapting text fields for RTL languages | by Mitya Kuznetsov | Bumble Tech | Medium
The text was updated successfully, but these errors were encountered: