Skip to content

Commit

Permalink
Merge pull request #1780 from peritus/master
Browse files Browse the repository at this point in the history
RN: Add accessibility labels to OnDeviceUI
  • Loading branch information
Hypnosphi authored Sep 6, 2017
2 parents 7610652 + 4a224d7 commit db01fac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 10 additions & 2 deletions app/react-native/src/preview/components/OnDeviceUI/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ export default class OnDeviceUI extends Component {
<Animated.View style={menuSpacerStyles} />
<View style={style.previewContainer}>
<Animated.View style={headerStyles}>
<TouchableWithoutFeedback onPress={this.menuToggledHandler}>
<TouchableWithoutFeedback
onPress={this.menuToggledHandler}
testID='Storybook.OnDeviceUI.open'
accessibilityLabel='Storybook.OnDeviceUI.open'
>
<View>
<Image source={openIcon} style={style.icon} />
</View>
Expand All @@ -140,7 +144,11 @@ export default class OnDeviceUI extends Component {
</View>
</View>
<Animated.View style={menuStyles} onLayout={this.menuLayoutHandler}>
<TouchableWithoutFeedback onPress={this.menuToggledHandler}>
<TouchableWithoutFeedback
onPress={this.menuToggledHandler}
testID='Storybook.OnDeviceUI.close'
accessibilityLabel='Storybook.OnDeviceUI.close'
>
<View style={style.closeButton}>
<Image source={closeIcon} style={style.icon} />
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ SectionHeader.propTypes = {
};

const ListItem = ({ title, selected, onPress }) =>
<TouchableOpacity key={title} style={style.item} onPress={onPress}>
<TouchableOpacity
key={title}
style={style.item}
onPress={onPress}
testID={`Storybook.ListItem.${title}`}
accessibilityLabel={`Storybook.ListItem.${title}`}
>
<Text style={[style.itemText, selected && style.itemTextSelected]}>
{title}
</Text>
Expand Down

0 comments on commit db01fac

Please sign in to comment.