Repository navigation
Description
Current behavior 🐛
A Skia desktop app on macOS exposes no accessibility tree to AX clients other than, possibly, VoiceOver. Walking the running app's window with AXUIElementCopyAttributeValue(kAXChildrenAttribute) from a process that's trusted for Accessibility returns only:
- the title-bar buttons,
- the title text,
- an
AXUnknownwith twoAXUnknownchildren.
No roles, identifiers, titles or values show up for any XAML element, including controls with AutomationProperties.AutomationId or AutomationProperties.Name.
Setting AXManualAccessibility or AXEnhancedUserInterface to true on the application element (the switches Chromium and Electron use to build their tree on demand) fails with -25205 / -25208 (attribute unsupported), and the tree stays the same.
Since #23005 shipped VoiceOver support for the macOS host, my guess is that the tree only gets built when VoiceOver itself is running. I didn't check with VoiceOver on.
Expected behavior 🎯
Automation clients (Accessibility Inspector, XCUITest for macOS, Appium mac2, or any tool using the AX API) can find elements by AutomationId and name, like UIA on the Win32 host. Or, if the tree has to be built on demand, it responds to AXManualAccessibility/AXEnhancedUserInterface or gets built for any AX client that asks.
How to reproduce it (as minimally and precisely as possible) 🔬
dotnet new unoappwith aButtonthat hasAutomationProperties.AutomationId="MyButton", run on the Skia desktop head on macOS.- From a terminal that has the Accessibility permission, run this Swift script:
import AppKit
let app = NSWorkspace.shared.runningApplications.first { $0.localizedName == "MyApp" }!
let root = AXUIElementCreateApplication(app.processIdentifier)
func dump(_ e: AXUIElement, _ d: Int) {
var role: CFTypeRef?; AXUIElementCopyAttributeValue(e, kAXRoleAttribute as CFString, &role)
var id: CFTypeRef?; AXUIElementCopyAttributeValue(e, kAXIdentifierAttribute as CFString, &id)
print(String(repeating: " ", count: d) + "\(role ?? "" as CFString) \(id ?? "" as CFString)")
var kids: CFTypeRef?
if AXUIElementCopyAttributeValue(e, kAXChildrenAttribute as CFString, &kids) == .success { (kids as! [AXUIElement]).forEach { dump($0, d + 1) } }
}
dump(root, 0)- The window content is
AXUnknownwith noMyButtonanywhere.
Workaround 🛠️
Click by window-relative coordinates, which is fragile.
Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
Desktop (macOS)
Uno.Sdk version (and other relevant versions) 📦
Uno.Sdk 6.6.0-dev.196, net10.0-desktop, macOS 26.2 (arm64)
IDE version 🧑💻
dotnet CLI
Anything else we need to know? 💬
#23934 tracks the same need for Skia on iOS and Android.
Activity