[macOS 26.7.1] AXWindows returns the application element instead of kitty's windows
Describe the bug
On macOS 26.7.1, kitty no longer exposes its OS windows through the Accessibility API. Each query that should return a window returns the kitty application element instead:
AXWindowson the app element returns one element. ItsAXRoleisAXApplication, it has noAXSubrole, noAXPosition, and_AXUIElementGetWindowfails on it (-25201).AXFocusedWindowandAXMainWindowreturn the same application element.AXUIElementCopyElementAtPositionat a point inside a kitty window also returns the application element.
So window managers and other Accessibility clients cannot see, move or resize kitty windows. Other apps on the same machine (for example Chrome) still return normal AXWindow / AXStandardWindow elements.
This started after the update from macOS 26.6.1 to 26.7.1. Before the update, with kitty 0.48.1, the same client moved kitty windows correctly. kitty 0.48.1 and 0.49.2 both show the bug on 26.7.1.
To Reproduce
- Start
kitty --config NONE. - From a process that has the Accessibility permission, read the windows of the kitty process:
import AppKit
import ApplicationServices
for app in NSWorkspace.shared.runningApplications
where app.bundleIdentifier == "net.kovidgoyal.kitty" {
let appElement = AXUIElementCreateApplication(app.processIdentifier)
var value: CFTypeRef?
AXUIElementCopyAttributeValue(appElement, kAXWindowsAttribute as CFString, &value)
for window in value as? [AXUIElement] ?? [] {
var role: CFTypeRef?
AXUIElementCopyAttributeValue(window, kAXRoleAttribute as CFString, &role)
print(app.processIdentifier, role as? String ?? "nil")
}
}
- See
AXApplicationprinted for the window, whereAXWindowis expected.
Environment details
kitty 0.49.2 (also 0.48.1), started with --config NONE
macOS 26.7.1 (25G241), arm64
Additional context
The bug reproduces with kitty --config NONE, so no config is needed. The window list in CGWindowListCopyWindowInfo is correct: it shows each kitty window at its real position. Only the Accessibility tree is wrong.
Correction: this is a macOS bug, not a kitty bug. On 26.7.1 (25G241), TextEdit and a plain AppKit app with one NSWindow and no accessibility code show the same thing: AXWindows returns the application element. Chrome is not affected. Overriding accessibilityWindows / accessibilityChildren on NSApplication, or the role and subrole on NSWindow, does not change the result, so I don't think kitty can work around it.
I reported it to Apple as FB25289632. Feel free to close this.