[RTL] Control box incorrectly positioned and affects wrong border in RTL installations #64512
Open
2 tasks done
Labels
[Type] Bug
An existing feature does not function as intended
Description
In WordPress installations using RTL (Right-to-Left) languages such as Farsi, there is a critical bug affecting the Button block's border styling in the block editor. This issue causes confusion and incorrect visual representation of the button's borders.
When a user attempts to style a Button block in an RTL environment, the border sizes are applied inversely to what is specified in the block settings. Specifically:
This behavior is contrary to the expected RTL handling, where the visual representation should match the input values, even though the underlying CSS may be flipped for RTL layouts.
The issue significantly impacts the user experience for RTL language users, as it becomes counterintuitive to style blocks correctly. Users have to apply settings opposite to their intended outcome, which is not only confusing but also goes against the principles of creating an inclusive and accessible editing experience for all language users.
This bug affects the core functionality of the Gutenberg editor in RTL contexts and requires immediate attention to ensure consistent and correct behavior across all language settings in WordPress.
Step-by-step reproduction instructions
Steps to Reproduce:
Expected Behavior:
The right border should be 2rem wide, and the left border should be 4rem wide.
Actual Behavior:
The border sizes are applied to the opposite sides:
Screenshots, screen recording, code snippet
rtl-control-box-borders.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: