Skip to content

Commit

Permalink
example - getStateDescription returns allways null
Browse files Browse the repository at this point in the history
  • Loading branch information
fabOnReact committed Jun 7, 2022
1 parent ad6732a commit d5f4c9c
Showing 1 changed file with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const {
StyleSheet,
Slider,
Platform,
Switch,
} = require('react-native');
import type {EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';

Expand Down Expand Up @@ -337,6 +338,55 @@ class AutomaticContentGrouping extends React.Component<{}> {
</View>
</TouchableNativeFeedback>
</RNTesterBlock>

<RNTesterBlock title="One of the child has accessibilityState (hasStateDescription triggers the announcement)">
<View accessible={true} accessibilityRole="button">
<View>
<Text accessible={false}>Text number 1</Text>
<Image
source={{
uri: 'https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png',
}}
style={{height: 50, width: 50}}
/>
</View>
</View>
</RNTesterBlock>

<RNTesterBlock title="One of the child has accessibilityState (hasStateDescription triggers the announcement)">
<View
accessible={true}
accessibilityHint="this is parent hint"
accessibilityState={{
checked: true,
selected: true,
disabled: true,
busy: true,
expanded: true,
}}>
<View
accessibilityState={{
checked: true,
selected: true,
disabled: true,
busy: true,
expanded: true,
}}>
<Text
accessibilityState={{
checked: true,
selected: true,
disabled: true,
busy: true,
expanded: true,
}}
accessibilityState={{checked: true}}
accessible={false}>
Text number 1
</Text>
</View>
</View>
</RNTesterBlock>
</View>
);
}
Expand Down

0 comments on commit d5f4c9c

Please sign in to comment.