I have a tableview that's set to load more items when scrolled near the bottom and I'm trying to make it accessible.
However when swiping to focus the tableView, the voiceover cursor always focuses the last cell even if it's really far from the current view which causes more cells to be loaded.
To avoid that, is there any way to force voiceover to focus on visible cells only? The default messages app on iOS seems to do this.
When the view gets updated with new cells, you can post layoutChanged notification from UIAccessibility indicating which element VoiceOver should focus.
UIAccessibility.post(notification:.layoutChanged, argument:elementToBeFocussed)
Read more information from the documentation.
UIAccessibility.post: https://developer.apple.com/documentation/uikit/uiaccessibility/1615194-post
UIAccessibility.Notification: https://developer.apple.com/documentation/uikit/uiaccessibility/notification
layoutChanged: https://developer.apple.com/documentation/uikit/uiaccessibility/notification/1620186-layoutchanged
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With