NSAccessibilityElement sendable but not MainActor?

I'm working on Swift 6 concurrency support for our app.

I've always thought of NSAccessibilityElement as being like all of the other UI classes- only used (or usable) on the main thread. As far as I've seen, they are always called on the main thread.

But in Xcode 16 beta 2, it's only marked as Sendable but not MainActor.

Is that just an oversight or do we need to worry about these being used / called on threads?

It's easy enough to do the async work (well, not that easy), but I don't want to do all that work if Xcode 16 beta 3 is just going to add a MainActor to it. I've already been burned by that once, in WebKit- the first beta was missing several MainActor declarations, in places where it was unclear from the documentation.

I added a bunch of async fixes to my delegates, only to have to take it all out when the second Xcode beta shipped and the SDK headers changed.

How complete are the async declarations in the Xcode 16 SDKs?

Another data point that NSAccessibilityElement should probably be MainActor: the UIKit counterpart, UIAccessibilityElement, is defined as @MainActor.

For now I'm assuming that NSAccessibilityElement should also be marked MainActor and just isn't yet. I've fixed my issues with MainActor.assumeIsolated in the places where my NSAccessibilityElement subclasses need main actor isolation. So far it looks like it is only used on the main thread so this is working for me, at least for now.

I'd love confirmation of this by Apple fixing the SDK if this assumption is correct.

NSAccessibilityElement sendable but not MainActor?
 
 
Q