Background
I have a UICollectionViewCell
, where I override accessibilityElementDidBecomeFocused
method.
I also override canBecomeFocused
to always return true.
The App allows Accessibility->Full Keyboard Access
(allowing the user to use the app with just Keyboard). isAccessibilityElement
is also set to true for the collectionviewCell
Problem
I have two scenarios
-
When both Keyboard access and VoiceOver are enabled In this case
accessibilityElementDidBecomeFocused
gets called as expected. -
When both Keyboard access is enabled but VoiceOver is disabled In this case
accessibilityElementDidBecomeFocused
isn't getting called.
Is this the expected behaviour? If yes, then is there a callback available when a view element gets focused via Keyboard with VoiceOver disabled?
Hello! Full Keyboard Access (FKA) focus uses the UIKit focus system instead of responding to the accessibility focus APIs. You can check out API about UIFocusSystem here: https://developer.apple.com/documentation/uikit/uifocussystem
This WWDC21 session about keyboard navigation (different from FKA, but uses the same focus system) may be helpful, if you'd like to check it out https://developer.apple.com/wwdc21/10260