You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/06/30 17:18:17 UTC

(superset) branch master updated: fix(dashboard): remove stray focus outline on Filter Badge popover (closes #38789) (#41398)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 25f7b907611 fix(dashboard): remove stray focus outline on Filter Badge popover (closes #38789) (#41398)
25f7b907611 is described below

commit 25f7b907611234cfff8ae93ddf5853677537a209
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Tue Jun 30 10:18:10 2026 -0700

    fix(dashboard): remove stray focus outline on Filter Badge popover (closes #38789) (#41398)
    
    Co-authored-by: Devin AI <de...@users.noreply.github.com>
---
 .../FiltersBadge/DetailsPanel/DetailsPanel.test.tsx     | 17 +++++++++++++++++
 .../src/dashboard/components/FiltersBadge/Styles.tsx    | 12 ++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/DetailsPanel.test.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/DetailsPanel.test.tsx
index d1090b0ed97..b20ac55f74e 100644
--- a/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/DetailsPanel.test.tsx
+++ b/superset-frontend/src/dashboard/components/FiltersBadge/DetailsPanel/DetailsPanel.test.tsx
@@ -16,6 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+/// <reference types="@emotion/jest" />
 import { RefObject } from 'react';
 import {
   fireEvent,
@@ -216,6 +217,22 @@ test('Close popover with ESC or ENTER', async () => {
   expect(props.setPopoverVisible).toHaveBeenCalledWith(false);
 });
 
+test('Popover container suppresses default browser focus outline', () => {
+  const props = createProps();
+  render(
+    <DetailsPanel {...props}>
+      <div>Content</div>
+    </DetailsPanel>,
+    { useRedux: true },
+  );
+
+  const menu = screen.getByRole('menu');
+  expect(menu).toHaveStyleRule('outline', 'none', { target: ':focus' });
+  expect(menu).toHaveStyleRule('outline', 'none', {
+    target: ':focus-visible',
+  });
+});
+
 test('Arrow key navigation switches focus between indicators', () => {
   // Prepare props with two indicators
   const props = createProps();
diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx
index 8009520cb42..6366d51f9b4 100644
--- a/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx
+++ b/superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx
@@ -118,6 +118,18 @@ export const FiltersDetailsContainer = styled.div`
     overflow-x: hidden;
 
     color: ${theme.colorText};
+
+    /*
+     * The container is a non-interactive wrapper that receives focus
+     * programmatically only to capture keyboard navigation events. Suppress the
+     * default browser focus outline so the popover does not show a blue ring.
+     * Focusable items inside (FilterItem) provide their own :focus-visible
+     * styles for keyboard accessibility.
+     */
+    &:focus,
+    &:focus-visible {
+      outline: none;
+    }
   `}
 `;