Say I have a UI element that moves on the screen. Is it possible to update its accessibility frame as it moves while VoiceOver is focused on it? From my tests, VoiceOver ignores UIAccessibilityLayoutChangedNotification
if it's sent repeatedly in a short period of time on iOS, while sending NSAccessibilityLayoutChangedNotification
on macOS triggers VoiceOver to reannounce the focused element repeatedly.
Is it possible to animate the accessibility frame on iOS and macOS?
Can you share more about the view you are working with, and what you are wanting to accomplish by animating its accessibility frame? For example, are you having an issue getting the accessibility frame to update to the element's new position after it is finished moving? Or just during the animation itself?
I am working with an NSAccessibilityElement
that corresponds to a custom UI element that doesn't inherit from NSView
or one of the other accessibility-enabled AppKit classes.
I would like to update its accessibility frame as the UI element moves on the screen (so, during the animation itself), while VoiceOver is focused on this element.