Button: restore specificity of high-contrast mode focus ring#76719
Button: restore specificity of high-contrast mode focus ring#76719
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. |
|
Size Change: -6 B (0%) Total Size: 7.66 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 3b08675. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23338817887
|
|
@t-hamano well spotted, the link variant should be working fine too |
| // Windows High Contrast mode will show this outline, but not the box-shadow. | ||
| // This rule is placed after variant outline declarations (e.g. is-primary, | ||
| // is-secondary, is-tertiary) to ensure it wins by source order at the same | ||
| // specificity, while not using `:not(:active)` to avoid outline flicker. |
There was a problem hiding this comment.
Looks fine as for fixing the regression, but I'm not clear on what the "flicker" is that we want to avoid. Rather, I feel like I'm missing visual feedback for button clicks (keyboard/mouse). Isn't it better to hide the outline on :active so we see that the click went through?
CleanShot.2026-03-21.at.05-27-04.mp4
There was a problem hiding this comment.
Isn't it better to hide the outline on
:activeso we see that the click went through?
I think this will also be useful in Windows high-contrast mode. In high-contrast mode, there is no interaction when clicked. If we were to remove the outline in the active state, it would look like this:
6fd3b19b409102d4547565d0e96e1037.mp4
This new behavior might be considered for WP 7.1.
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the update.
|
merging this as it's fix over what's shipping. Happy to follow-up with the suggestion discussed in #76719 (comment) in a new PR |
|
There was a conflict while trying to cherry-pick the commit to the wp/7.0 branch. Please resolve the conflict manually and create a PR to the wp/7.0 branch. PRs to wp/7.0 are similar to PRs to trunk, but you should base your PR on the wp/7.0 branch instead of trunk. |
* Button: restore specificity of high-contrast mode focus ring for all variants * CHANGELOG * Move after link variant Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
…#76770) * Button: restore specificity of high-contrast mode focus ring for all variants * CHANGELOG * Move after link variant Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
|
This PR was backported by #76770. |
This updates the pinned hash from the `gutenberg` from `2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d` to `3edafcc90fc4520939d69279e26ace69390582be`. The following changes are included: - RTC: Use activation hook to enable RTC by default (WordPress/gutenberg#76736) - Connectors: Align client-side registration API with server-side (WordPress/gutenberg#76737) - Connectors: Support non-AI provider types and add JS extensibility e2e test (WordPress/gutenberg#76722) - RTC: Add E2E "stress test" with complex interactions (WordPress/gutenberg#76055) - Button: restore specificity of high-contrast mode focus ring (WordPress/gutenberg#76719) (WordPress/gutenberg#76770) - Connectors: Improve AI plugin button (WordPress/gutenberg#76759) - RTC: Use prepared queries instead of `*_post_meta` functions (WordPress/gutenberg#76779) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d…3edafcc90fc4520939d69279e26ace69390582be. Log created with: git log --reverse --format="- %s" 2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d..3edafcc90fc4520939d69279e26ace69390582be | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/trunk@62102 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d` to `3edafcc90fc4520939d69279e26ace69390582be`. The following changes are included: - RTC: Use activation hook to enable RTC by default (WordPress/gutenberg#76736) - Connectors: Align client-side registration API with server-side (WordPress/gutenberg#76737) - Connectors: Support non-AI provider types and add JS extensibility e2e test (WordPress/gutenberg#76722) - RTC: Add E2E "stress test" with complex interactions (WordPress/gutenberg#76055) - Button: restore specificity of high-contrast mode focus ring (WordPress/gutenberg#76719) (WordPress/gutenberg#76770) - Connectors: Improve AI plugin button (WordPress/gutenberg#76759) - RTC: Use prepared queries instead of `*_post_meta` functions (WordPress/gutenberg#76779) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d…3edafcc90fc4520939d69279e26ace69390582be. Log created with: git log --reverse --format="- %s" 2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d..3edafcc90fc4520939d69279e26ace69390582be | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. Built from https://develop.svn.wordpress.org/trunk@62102 git-svn-id: http://core.svn.wordpress.org/trunk@61384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
Following up in #76833 |
* Button: restore specificity of high-contrast mode focus ring for all variants * CHANGELOG * Move after link variant Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>

What?
Closes #76711
Restore the thicker focus ring for all variants of the
Buttoncomponent from@wordpress/componentswhen seen in High Contrast (ie. forced colors) mode.Why?
Fixing a regression (see #76711)
How?
Moving styles around to let the declaration order win for rules with same CSS specificity
Testing Instructions
Screenshots or screencast
Use of AI Tools
Cursor + Claude Opus 4.6