From d107cb602a1905edd9adbc0affc530df1163bd2a Mon Sep 17 00:00:00 2001 From: Andrew Hayward Date: Tue, 21 Nov 2023 12:45:08 +0000 Subject: [PATCH 1/2] Add focus rings to focusable disabled buttons Secondary and tertiary buttons don't have focus rings when they are disabled but `__experimentalIsFocusable` is true. --- packages/components/src/button/style.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/components/src/button/style.scss b/packages/components/src/button/style.scss index 03273056cfa17..4b11d9169a090 100644 --- a/packages/components/src/button/style.scss +++ b/packages/components/src/button/style.scss @@ -129,8 +129,11 @@ background: transparent; transform: none; opacity: 1; - box-shadow: none; - outline: none; + + &:not(:focus) { + box-shadow: none; + outline: none; + } } } From 34c213c43aa8ab31eb85c0ca6431098cb98b5aa6 Mon Sep 17 00:00:00 2001 From: Andrew Hayward Date: Tue, 21 Nov 2023 14:09:14 +0000 Subject: [PATCH 2/2] Updating CHANGELOG.md --- packages/components/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index eb6e595e304ec..eafd53a3dc1a7 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Enhancements + +- `Button`: Add focus rings to focusable disabled buttons ([#56383](https://github.com/WordPress/gutenberg/pull/56383)). + ### Experimental - `Tabs`: Memoize and expose the component context ([#56224](https://github.com/WordPress/gutenberg/pull/56224)).