-
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
Block Editor: Use the tooltip from a button in 'ButtonBlockAppender' #65113
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -76,20 +76,11 @@ function ButtonBlockAppender( | |||
// eslint-disable-next-line no-restricted-syntax | |||
disabled={ disabled } | |||
label={ label } | |||
showTooltip |
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.
The isToggleButton || hasSingleBlockType
condition was always true
.
{ ! hasSingleBlockType && ( | ||
<VisuallyHidden as="span">{ label }</VisuallyHidden> | ||
) } |
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.
I think this was a leftover when the button appender had a visual label. The button has an aria-label
, so visually hidden text shouldn't be necessary for a11y.
cc @afercia
Size Change: -47 B (0%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
Flaky tests detected in 53f8635. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10735021914
|
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 LGTM and tests well 👍
Thanks @Mamaduka, always nice to see using built-in functionality where we can 👏
Thanks for testing, @tyxla! |
What?
PR updates the
ButtonBlockAppender
to use theButton
built-in feature for tooltips. It also removes the unnecessaryVisuallyHidden
component.Why?
Reduces complexity in the component by removing redundant logic.
Testing Instructions
Blocks for testing
Testing Instructions for Keyboard
Same.
Screenshots or screencast