@Frameworks Engineer
FocusState and AccessibilityFocusState are independent settings, and can be pointing at different views at the same time.
Chaning FocusState does seem to work (mostly) correctly to set the focus state to the desired view, but the accessibility focus state doesn't change. (I say mostly because in some cases setting the @FocusState fails and the variable's value is set to nil instead. I haven't figured out what that fail case is yet.)
Ignoring the mystery fail case, having the FocusState and AccessibilityFocusState point to different views leads to some odd behavior. If I have the a11y focus set to a button, and that button's action changes the FocusState to a text field, then the text cursor moves to the text field, but the a11y focus stays on the button.
In FKA mode, pressing the spacebar triggers the button, which can then change the focus state to a different field.
However, typing a character other than a space causes that character to be added to the text field that has the focus state.
Topic:
Accessibility & Inclusion
SubTopic:
General
Tags: