Skip to content

BorderControl: Remove double focus outline - #85173

Merged
ciampo merged 7 commits into
WordPress:trunkfrom
yashjawale:fix/focus-ring-border-control-80138
Oct 20, 2026
Merged

ciampo merged 7 commits into
WordPress:trunkfrom
yashjawale:fix/focus-ring-border-control-80138

Conversation

@yashjawale

Copy link
Copy Markdown
Contributor

What?

Part of #80138

This PR removes the double focus rings on BorderControl by removing the box-shadow focus rules so only the ones provided by Button component stays.

Why?

In the new design system, the button's focus ring is represented by an outline. Additionally, the focus ring for the components/Button component is now represented by an outline instead of a box-shadow.

There are still many legacy box-shadow-based focus styles present throughout the Gutenberg codebase. This PR changes the BorderControl component styling towards the same direction.

How?

Testing Instructions

  1. Run storybook with npm run storybook:dev
  2. Navigate to ?path=/story/components-bordercontrol--default
  3. Tab to focus on the button in border control
  4. Notice the outline

Screenshots or screencast

Before After
Screenshot 2026-10-20 at 1 39 32 PM Screenshot 2026-10-20 at 1 39 10 PM

Use of AI Tools

None

@github-actions github-actions Bot added the [Package] Components /packages/components label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yashjawale <yashjawale@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

@yashjawale

Copy link
Copy Markdown
Contributor Author

Originally, the shadow was also showed on hover, which isn't anymore after the change

image

After

image

Will it be better to add the outline back for hover too?

@yashjawale
yashjawale marked this pull request as ready for review October 20, 2026 08:19
@yashjawale
yashjawale requested a review from a team as a code owner October 20, 2026 08:19

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

The background color on change should be sufficient, thank you!

@ciampo ciampo added the [Type] Bug An existing feature does not function as intended label Oct 20, 2026
Comment thread packages/components/CHANGELOG.md Outdated
- `Snackbar`: Keep snackbars that have an action on screen for 10 seconds instead of 6 before they are dismissed automatically ([#84842](https://github.com/WordPress/gutenberg/pull/84842)).
- `Tabs`: Show the tab panel's focus ring with the design system's outline instead of a legacy box-shadow ([#84914](https://github.com/WordPress/gutenberg/pull/84914)).
- `RangeControl`: Add a `size` prop with `default` and `compact` options ([#69844](https://github.com/WordPress/gutenberg/pull/69844)).
- `BorderControl`: Remove double outline & use design system's focus ring ([#85173](https://github.com/WordPress/gutenberg/pull/85173)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move to the new unreleased section

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated ✅

@ciampo
ciampo enabled auto-merge (squash) October 20, 2026 11:57
@ciampo
ciampo merged commit 3531b59 into WordPress:trunk Oct 20, 2026
116 checks passed
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 20, 2026
@ciampo ciampo added Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Oct 20, 2026
@github-actions github-actions Bot removed the Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 20, 2026
gutenbergplugin pushed a commit that referenced this pull request Oct 20, 2026
* fix: remove duplicate focus outline

* docs; add changelog entry

* docs: update changelog to use correct section

---------

Co-authored-by: yashjawale <yashjawale@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
@github-actions github-actions Bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Oct 20, 2026
@github-actions

Copy link
Copy Markdown

I just cherry-picked this PR to the wp/7.2 branch to get it included in the next release: 2fc7075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) Backported to WP Core Pull request that has been successfully merged into WP Core [Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants