When dismissing a dialog/window, Many #macOS apps, that sit in the status menu r...
Chi Kim @chikim@mastodon.social
When dismissing a dialog/window, Many #macOS apps, that sit in the status menu running in the background, often show an orphan window or present themselves as foreground app with no window to VoiceOver even though sighted users cannot see them. This is an easy fix with two lines of code. It closes all windows and hides the app from VoiceOver, as intended.
NSApplication.shared.hide(nil)
NSApplication.shared.windows.forEach { $0.close() }
#Accessibility