From 5c22fab2c7a10915d6277754f602dfdde756d027 Mon Sep 17 00:00:00 2001 From: yashjawale Date: Fri, 4 Sep 2026 13:25:06 +0530 Subject: [PATCH 1/7] feat: use outline for focus for tab panel --- packages/components/src/tab-panel/style.scss | 25 +++----------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/packages/components/src/tab-panel/style.scss b/packages/components/src/tab-panel/style.scss index 1a88fa17b261b4..dbd87c8c8451dc 100644 --- a/packages/components/src/tab-panel/style.scss +++ b/packages/components/src/tab-panel/style.scss @@ -1,4 +1,5 @@ @use "@wordpress/base-styles/variables" as *; +@use "@wordpress/base-styles/mixins" as *; .components-tab-panel__tabs { display: flex; @@ -73,24 +74,11 @@ position: absolute; inset: var(--wpds-dimension-padding-md); pointer-events: none; - - // Draw the indicator. - box-shadow: 0 0 0 0 transparent; border-radius: var(--wpds-border-radius-sm); - - // Animation - @media not (prefers-reduced-motion) { - transition: box-shadow 0.1s linear; - } } &:focus-visible::before { - box-shadow: - 0 0 0 var(--wpds-border-width-focus) - var(--wpds-color-stroke-focus); - - // Windows high contrast mode. - outline: 2px solid transparent; + @include outset-ring__focus(); } .components-tab-panel__tabs[aria-orientation="vertical"] & { @@ -108,17 +96,10 @@ .components-tab-panel__tab-content { &:focus { - box-shadow: none; outline: none; } &:focus-visible { - box-shadow: - 0 0 0 var(--wpds-border-width-focus) - var(--wpds-color-stroke-focus); - - // Windows high contrast mode. - outline: 2px solid transparent; - outline-offset: 0; + @include outset-ring__focus(); } } From 50b2814315512888f571ed713229ee6a2d900ce6 Mon Sep 17 00:00:00 2001 From: yashjawale Date: Fri, 4 Sep 2026 13:56:29 +0530 Subject: [PATCH 2/7] docs: add changelog entry --- packages/components/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index ed0073a65c0d0f..6b2cb1cab238d3 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -7,6 +7,7 @@ - `Popover`: Widen `offset` to also accept an object with separate main and cross axis offsets. The same applies to `BorderBoxControl`'s `popoverOffset` prop ([#82060](https://github.com/WordPress/gutenberg/pull/82060)). - `ToolsPanelItem`: Add `defaultShown` to show an optional item that has no value, and an `onShownChange` callback that fires only when the user toggles the item in the panel's menu ([#78010](https://github.com/WordPress/gutenberg/pull/78010)). - `BorderBoxControl`: render the linked/unlinked toggle in a row alongside the label when a visible label is present, so it lines up with the equivalent toggle on sibling controls. Without a visible label the toggle stays beside the inputs, as before. The visible label is now a `BaseControl.VisualLabel`, so it renders as a `span` rather than a `label` element; it was never associated with an input in either form ([#82163](https://github.com/WordPress/gutenberg/pull/82163)). +- `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation. ([#82421](https://github.com/WordPress/gutenberg/pull/82421/)). ### Bug Fixes From 03129c3779d9d87d974a0e3eadd577ebd6332acf Mon Sep 17 00:00:00 2001 From: yashjawale Date: Fri, 4 Sep 2026 14:00:38 +0530 Subject: [PATCH 3/7] test: change to trigger changelog workflow --- packages/components/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 6b2cb1cab238d3..9f000a1c18bfff 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -7,7 +7,7 @@ - `Popover`: Widen `offset` to also accept an object with separate main and cross axis offsets. The same applies to `BorderBoxControl`'s `popoverOffset` prop ([#82060](https://github.com/WordPress/gutenberg/pull/82060)). - `ToolsPanelItem`: Add `defaultShown` to show an optional item that has no value, and an `onShownChange` callback that fires only when the user toggles the item in the panel's menu ([#78010](https://github.com/WordPress/gutenberg/pull/78010)). - `BorderBoxControl`: render the linked/unlinked toggle in a row alongside the label when a visible label is present, so it lines up with the equivalent toggle on sibling controls. Without a visible label the toggle stays beside the inputs, as before. The visible label is now a `BaseControl.VisualLabel`, so it renders as a `span` rather than a `label` element; it was never associated with an input in either form ([#82163](https://github.com/WordPress/gutenberg/pull/82163)). -- `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation. ([#82421](https://github.com/WordPress/gutenberg/pull/82421/)). +- `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation. ([#82421](https://github.com/WordPress/gutenberg/pull/82421/)) ### Bug Fixes From f2a4b6b0d628b3a11ba6d1106d30f8c9abd6b386 Mon Sep 17 00:00:00 2001 From: yashjawale Date: Fri, 4 Sep 2026 14:00:48 +0530 Subject: [PATCH 4/7] reset change --- packages/components/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 9f000a1c18bfff..6b2cb1cab238d3 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -7,7 +7,7 @@ - `Popover`: Widen `offset` to also accept an object with separate main and cross axis offsets. The same applies to `BorderBoxControl`'s `popoverOffset` prop ([#82060](https://github.com/WordPress/gutenberg/pull/82060)). - `ToolsPanelItem`: Add `defaultShown` to show an optional item that has no value, and an `onShownChange` callback that fires only when the user toggles the item in the panel's menu ([#78010](https://github.com/WordPress/gutenberg/pull/78010)). - `BorderBoxControl`: render the linked/unlinked toggle in a row alongside the label when a visible label is present, so it lines up with the equivalent toggle on sibling controls. Without a visible label the toggle stays beside the inputs, as before. The visible label is now a `BaseControl.VisualLabel`, so it renders as a `span` rather than a `label` element; it was never associated with an input in either form ([#82163](https://github.com/WordPress/gutenberg/pull/82163)). -- `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation. ([#82421](https://github.com/WordPress/gutenberg/pull/82421/)) +- `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation. ([#82421](https://github.com/WordPress/gutenberg/pull/82421/)). ### Bug Fixes From 263190660a83655fe5297d8fbe1c23dc4fed040a Mon Sep 17 00:00:00 2001 From: yashjawale Date: Fri, 4 Sep 2026 15:15:18 +0530 Subject: [PATCH 5/7] fix: set outline offset to 0 after the mixin --- packages/components/src/tab-panel/style.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/components/src/tab-panel/style.scss b/packages/components/src/tab-panel/style.scss index dbd87c8c8451dc..9a68e4be4b3f6b 100644 --- a/packages/components/src/tab-panel/style.scss +++ b/packages/components/src/tab-panel/style.scss @@ -79,6 +79,7 @@ &:focus-visible::before { @include outset-ring__focus(); + outline-offset: 0; } .components-tab-panel__tabs[aria-orientation="vertical"] & { @@ -101,5 +102,6 @@ &:focus-visible { @include outset-ring__focus(); + outline-offset: 0; } } From 784f2b82930eff9e7ee4359da3e0b689cb98b11a Mon Sep 17 00:00:00 2001 From: yashjawale Date: Fri, 4 Sep 2026 15:16:18 +0530 Subject: [PATCH 6/7] fix: remove box-shadow leftovers --- packages/components/src/tab-panel/style.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/components/src/tab-panel/style.scss b/packages/components/src/tab-panel/style.scss index 9a68e4be4b3f6b..07830ae5be0c4e 100644 --- a/packages/components/src/tab-panel/style.scss +++ b/packages/components/src/tab-panel/style.scss @@ -17,7 +17,6 @@ height: $grid-unit-60 !important; // https://github.com/WordPress/gutenberg/pull/65075#discussion_r1746282734 background: transparent; border: none; - box-shadow: none; cursor: var(--wpds-cursor-control); padding: 3px var(--wpds-dimension-padding-lg); // Use padding to offset the is-active border, this benefits Windows High Contrast mode margin-left: 0; @@ -35,7 +34,6 @@ &:focus:not(:disabled) { position: relative; - box-shadow: none; outline: none; } From d162c612af313e49c25f70b79bda4185478a8c63 Mon Sep 17 00:00:00 2001 From: yashjawale Date: Fri, 4 Sep 2026 15:20:19 +0530 Subject: [PATCH 7/7] docs: remove trailing / in PR link in changelog --- packages/components/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 6b2cb1cab238d3..9d8b64ce6c563f 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -7,7 +7,7 @@ - `Popover`: Widen `offset` to also accept an object with separate main and cross axis offsets. The same applies to `BorderBoxControl`'s `popoverOffset` prop ([#82060](https://github.com/WordPress/gutenberg/pull/82060)). - `ToolsPanelItem`: Add `defaultShown` to show an optional item that has no value, and an `onShownChange` callback that fires only when the user toggles the item in the panel's menu ([#78010](https://github.com/WordPress/gutenberg/pull/78010)). - `BorderBoxControl`: render the linked/unlinked toggle in a row alongside the label when a visible label is present, so it lines up with the equivalent toggle on sibling controls. Without a visible label the toggle stays beside the inputs, as before. The visible label is now a `BaseControl.VisualLabel`, so it renders as a `span` rather than a `label` element; it was never associated with an input in either form ([#82163](https://github.com/WordPress/gutenberg/pull/82163)). -- `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation. ([#82421](https://github.com/WordPress/gutenberg/pull/82421/)). +- `TabPanel`: Updated to show outline via design system's mixin for focus ring instead of legacy box-shadow implementation ([#82421](https://github.com/WordPress/gutenberg/pull/82421)). ### Bug Fixes