Fix: Keep Guide close button visible on hover#73220
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. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @RoyHridoy! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
This is a good fix, but let's test the Guide instances in the Editor too. When the default admin theme is selected I suspect the close button will become invisible on hover due to the color of the illustrations used there? We should fix any issues there before merging I think. |
… to welcome-guide Components
|
I don't love the proliferation of the style override, but at least the component is fixed. I'll defer to others on whether this trade-off is worth it. |
Thanks for the feedback! I totally understand the concern about adding more style overrides. Ideally, I’d avoid both overrides and duplicated styles. While working on this, I noticed that there’s already some CSS duplication in the following files:
Applying this scoped override felt like the most consistent and least disruptive approach for now. I’m definitely open to learning about alternative solutions if there’s a cleaner way to handle this, just felt other options might require more effort for a small fix like this. |
aduth
left a comment
There was a problem hiding this comment.
I think this is absolutely an improvement to the base Guide component we should make, as its current default behavior is quite problematic.
I'll review to check current usage is covered, but another alternative to consider is a default which might work better more broadly, like a hover effect that does some color mixing to lighten the color (e.g. fill: color-mix(in srgb, white 30%, currentColor)).
aduth
left a comment
There was a problem hiding this comment.
As best I can tell, this covers existing usage so there shouldn't be any regressions. I think we may still want some hover effect for the default component, but it doesn't impact current usage.
So it looks good to me 👍 But I'm curious for feedback on the idea of color mixing or default hover effects.
|
Thanks for exploring those options @RoyHridoy ! Just to clarify, is your suggestion to proceed with these changes as-is and not introduce the color mixing? I agree that some of those combinations aren't great, stemming from the |
|
It also might be worthwhile to note this fix in the components changelog (per the optional, failing build), though not strictly necessary. |
Right! The intention is to move forward with these changes as-is. Adding color mixing introduced edge cases and inconsistent hover colors, so addressing each consumer individually later is a safer strategy. The current solution keeps Guide generic and prevents the regression. I’d also include the changelog update. Appreciate the review! The failure looks like a TypeScript memory issue, not related to my changes. A re-run should fix it. |
|
Sounds good 👍 I also see some similar discussion in #73219 to this effect of follow-up with revisiting guides. Let's get this fix merged in the meantime 🚀 Congrats on your first contribution! |





What?
Closes #73219
Why?
This PR fixes an accessibility/visibility issue in the Guide component.
Currently, the close button becomes invisible on hover because it changes to white while the background is also white.
How?
The Guide component is shared across several welcome-guide implementations
(edit-site, edit-post, editor, and edit-widgets). These use blue backgrounds,
which required a white hover color for the close button.
However, this hover style caused inconsistency in other contexts where Guide
is used on light backgrounds.
This change removes the hover style from Guide and applies it only in
welcome-guide components, keeping Guide generic and easier to reuse.
Testing Instructions
npm run storybook:devScreenshots or screencast
screencast-13-11-2025.mp4