ColorPalette, BorderControl: Don't hyphenate HEX value in aria-label#52932
ColorPalette, BorderControl: Don't hyphenate HEX value in aria-label#52932
aria-label#52932Conversation
|
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
|
mirka
left a comment
There was a problem hiding this comment.
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-labeltext in theColorPaletteandBorderControlcomponent.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-labelis 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.