-
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
ColorPalette, BorderControl: Don't hyphenate HEX value in aria-label
#52932
Conversation
Size Change: -49 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in 1ba9e09. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5656941057
|
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 and tests well 🚀 Thanks!
I noticed that the double quotes surrounding the color name and color value are escaped in the browser developer tool.
I feel like this is purely a devtools issue in how it presents the underlying HTML, and not a bug in our app code. On Mac, the three major browsers show them without escaping. But it will revert to the escaped strings when you click "Edit HTML" for example.
Thanks for the review, @mirka!
Strangely enough, in my environment, they are escaped without editing the HTML. However, I would like to merge this PR, as the double-quote entities should have been escaped before, and it may be a problem with my browser settings 😅 |
Close re-opened #48119
What?
This PR removes hyphens from the HEX values contained in the
aria-label
text in theColorPalette
andBorderControl
component.Why?
It seems to make more sense to display the HEX values as they are rather than to control the string to make it read out well. For more information, check out the discussion beginning with this comment.
How?
I searched the repository for keywords
#-
and.join( '-' )
, which would be included in the code when performing this process, and updated the translator comments, text, and tests.Testing Instructions for Keyboard
BorderBoxControl
.aria-label
is correctly applied to the button to the left of the input field as well.What may be a newly discovered bug
I noticed that the double quotes surrounding the color name and color value are escaped in the browser developer tool.
This problem occurs in both the block editor and Storybook, as well as in trunk. As far as I know, this problem should not have occurred when I submitted a similar PR, #51197.
If this is considered a bug, I would like to submit a new issue to investigate.