-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix labelling and semantics of the paragraph block Left to right control #42324
Conversation
Size Change: -23 B (0%) Total Size: 1.25 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.
Code looks good. Not sure about RTL testing though, ensure this works before merging.
@ajitbohra when you have a chance: this PR would need some quick testing in RTL and a look at the visual change that restores the original toggle button. Thanks! |
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.
Nice improvement 👍
Fixes #42314
What?
This PR seeks to fix the
ParagraphRTLControl
shown when the admin is set to a RTL language. This control renders a dropdown menu that has only one menu item. The dropdown toggle button is unlabelled and the menu item doesn't have any semantics for the selected state.Why?
This control used to be a simple Toggle button. It was changed to a dropdown menu in #29863 in the context of a large refactoring. I guess changing this control was not intentional: a dropdown menu doesn't make much sense in this case. Also, using a simple toggle button restores the missing labelling and selected state semantics.
How?
Converted the Paragraph block
ParagraphRTLControl
from aToolbarDropdownMenu
to aToolbarButton
.Testing Instructions
aria-label
attribute with value 'Left to Right'aria-pressed
attribute with value false / true depending on whether the setting is activeScreenshots or screencast
Before (dropdown):
After (toolbar toggle button):