Skip to content

The system focus ring shows up on bar widgets and on a popup's first button #515

Closed

Description

@Seb-GRAF

What happens

With macOS keyboard navigation turned on (System Settings › Keyboard › Keyboard navigation), StableBar draws the blue system focus ring where nobody asked for it:

  • Popups. Clicking a widget opens its popup with the ring around the first button, such as the first row or the pin button. Pinning a hover popup by clicking it does the same.
  • The bar. A widget in the bar sometimes shows the ring, for example after quitting and relaunching StableBar. The bar takes keyboard input only while you edit it, so Tab can't have put the ring there.

Steps to reproduce

  1. Turn on Keyboard navigation in System Settings › Keyboard.
  2. Click a widget that opens a popup, such as Sound or Menu bar items.
  3. The popup's first button has the ring before any key is pressed.

Expected

  • Opening a popup with the mouse focuses nothing. Pressing Tab moves focus into the popup and shows it in the popup's own style rather than the system ring.
  • The bar never shows a focus ring outside edit mode.

Environment

  • StableBar built from main (f105cfe)
  • macOS 26.6.2
  • defaults read -g AppleKeyboardUIMode returns 2

Evidence

A nonactivating NSPanel with a SwiftUI hosting view, set up like PopupPanel, was made key off-screen with keyboard navigation on:

  • After makeKeyAndOrderFront, the first button is focused and the panel's first responder is SwiftUI's key-view proxy.
  • After makeKeyAndOrderFront and then makeFirstResponder(nil), nothing is focused. Tab still moves focus to the first button, and a text field that sets its focus in onAppear still gets it.
  • orderFront followed later by makeKey, as when a hover popup gets pinned, focuses the first button too.

Diagnosis

  • When a window becomes key with keyboard navigation on, AppKit makes the first view in its key-view loop the first responder, and SwiftUI focuses that view's first button. WidgetPopup makes the popup key when it opens on click (Sources/StableBar/WidgetPopup.swift:196) and when a hover popup gets pinned (WidgetPopup.swift:288).
  • BarPanel and PopupPanel always draw as key windows (hasKeyAppearance, Sources/StableBar/StableBarApp.swift:170 and WidgetPopup.swift:11). So a focused view keeps its ring after the window stops being key. A widget in the bar can keep focus from edit mode (StableBarApp.swift:435).
  • Only Settings' tab bar and the setup guide's closing card turn the focus effect off today.

Related

Triaged by Claude Code via T3 Code (Claude Opus 5.5).

Activity

  1. added
    bug
    accessibility
    on Nov 9, 2026
  2. stablebar-releases commented on Nov 10, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.12.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitybugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions