Fix usage of tooltip in the Circular option picker.#68602
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 |
* Fix usage of tooltip in the Circular option picker. * Add changelog entry. * Adjust tests. * Adjust more tests. * Adjust one more test. * Update test snapshot. * Adjust more tests. * Adjust more tests. * Adjust one more test. Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
* Fix usage of tooltip in the Circular option picker. * Add changelog entry. * Adjust tests. * Adjust more tests. * Adjust one more test. * Update test snapshot. * Adjust more tests. * Adjust more tests. * Adjust one more test. Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
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
OptionAsOptionandOptionAsButtonuse the Button component under the hood. This PR leverages the Buttonlabelprop to render a tooltip instead of wrapping the component within a Tooltip.ColorPalettecomponent.labelprop by using the existingtooltipTextprop as its value.Testing Instructions
aria-describedbyattribute added to the currently focused color button.Testing Instructions for Keyboard
Screenshots or screencast