-
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
Fix usage of tooltip in the Circular option picker. #68602
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: -43 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
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. |
Note: The changes in this PR are pretty simple but required to adjust a pretty decent amount of tests to remove the prefix |
Fixes #68601
What?
Why?
Tooltips must be used to visually expose the accessible name, there shouldn't be a mismatch between the visible text and the accessible name. Also, redundant announcement are just noisy.
How?
Turns out both
OptionAsOption
andOptionAsButton
use the Button component under the hood. This PR leverages the Buttonlabel
prop to render a tooltip instead of wrapping the component within a Tooltip.ColorPalette
component.label
prop by using the existingtooltipText
prop as its value.Testing Instructions
aria-describedby
attribute added to the currently focused color button.Testing Instructions for Keyboard
Screenshots or screencast