/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {
SafeAreaView,
StyleSheet,
TouchableOpacity,
View,
Text,
AccessibilityInfo,
} from 'react-native';
import AccessibilityWrapper from './AccessibilityWrapper';
const App = () => {
const ref1 = React.useRef();
const ref2 = React.useRef();
const ref3 = React.useRef();
const [state, setState] = React.useState([ref1, ref2, ref3]);
const [changed, setChanged] = React.useState(false);
return (
<>
RNAccessibilityOrder
{
if (!changed) {
setState([ref3, ref2, ref1]);
} else {
setState([ref1, ref2, ref3]);
}
setChanged(!changed);
}}>
Change accessibility focus order
Button 1
Button 2
Button 3
>
);
};
const styles = StyleSheet.create({
body: {
flex: 1,
paddingHorizontal: 10,
},
group: {
padding: 10,
},
header: {
backgroundColor: '#008577',
paddingHorizontal: 20,
paddingVertical: 20,
},
headerText: {
color: 'white',
},
});
export default App;