You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The setKeyboardFocus method from the A11yModule is not working on iOS, while it works perfectly on Android. I am attempting to switch focus between two Touchable elements using their ref.
Steps to Reproduce:
Create two TouchableOpacity elements in a React Native app.
Assign ref to each element.
Call A11yModule?.setKeyboardFocus(ref) to switch focus to one of the elements.
Test the behavior on Android and iOS.
Expected Behavior:
Focus should move to the target element on iOS when setKeyboardFocus is called, just as it does on Android.
Actual Behavior:
No focus movement occurs on iOS.
Code
`import { A11yModule } from 'react-native-a11y';
import React, { useRef } from 'react';
import { TouchableOpacity, Text } from 'react-native';
Hello @ayushmahajan12,
The current solution for physical keyboard focusing on iOS is a bit outdated. It might have some issues with moving focus between different UIViewControllers.
I will try to update the package, but it might take some time. In the meantime, you can try using another package to solve this problem: react-native-external-keyboard. Additionally, it also includes auto-focus and tint color functionality.
The main idea was to split the library for a better update strategy and package minimization, allowing you to use only specific functionality. It help to release new features, but there are problems with updating this one.
The setKeyboardFocus method from the A11yModule is not working on iOS, while it works perfectly on Android. I am attempting to switch focus between two Touchable elements using their ref.
Steps to Reproduce:
Expected Behavior:
Focus should move to the target element on iOS when setKeyboardFocus is called, just as it does on Android.
Actual Behavior:
No focus movement occurs on iOS.
Code
`import { A11yModule } from 'react-native-a11y';
import React, { useRef } from 'react';
import { TouchableOpacity, Text } from 'react-native';
const AccessibilityTest = () => {
const firstItemRef = useRef(null);
const secondItemRef = useRef(null);
};
export default AccessibilityTest;
`
ScreenRecording
ScreenRecording_12-17-2024.18-07-25_1.MP4
Environment:
Library Version: 0.5.6
React Native Version: 0.74.5
iOS Version: 18.1.1
Device/Simulator: Device
Additional Notes:
I have ensured that: ref is correctly assigned.
The text was updated successfully, but these errors were encountered: