-
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
Locked block toolbar layout broken when 'Show button text labels' is enabled #49865
Comments
@tellthemachines curious if you could dive in here as I know you've done some fixes on the text label experience <3 |
This is coming from this CSS:
It's removing the left padding on the lock button, which you can see has compressed spacing both when using icons and using text; but it makes a much bigger difference to comprehension when viewing as text. Separately - is it necessary for that button to contain the block name? That context should already be apparent, since the neighboring button gives the context. Seems unnecessarily verbose. |
Created PR to resolve styling issues.
I like the idea and am happy to create PR if everyone agrees on the change. |
I'd agree to try to remove the block name. However, I think that button needs a few more improvements so yes I'd recommend a separate PR. Regardless whether it's icon or label, when a block is locked that button gets disabled with both a That's not ideal because the button can't be navigated to with the keyboard. As such, there's no contextual information for screen reader users (although screen readers do provide alternative ways to get to that button). In several places in the Editor we do use a different pattern to keep disabled controls discoverable. See Focusability of disabled controls in the ARIA practices. To recap:
|
I created a separate PR to make the button label less verbose - #51083. @afercia, the block switcher button can be disabled for other reasons as well, so it's not tied to block locking. If you prefer, we can open a separate issue.
The button also serves as a visual clue for the block type; this is probably why disabled styles aren't applied. |
Thanks @Mamaduka! I will create a separate issue for the disabled state. |
Description
When the 'Show button text labels' preference is enabled, a locked block toolbar doesn't look right.
There's no separation between the block switcher button and the unlock button. Visually, it's pretty confusing. Also the paddign on the left is incorrect.
Step-by-step reproduction instructions
For reference, here's how the block toolbar looks when the block is not locked:
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: