diff --git a/src/components/PinButton.js b/src/components/PinButton.js index 6292123faa39..800e0a828d1d 100644 --- a/src/components/PinButton.js +++ b/src/components/PinButton.js @@ -1,5 +1,4 @@ import React from 'react'; -import {Pressable} from 'react-native'; import styles from '../styles/styles'; import themeColors from '../styles/themes/default'; import Icon from './Icon'; @@ -9,6 +8,7 @@ import reportPropTypes from '../pages/reportPropTypes'; import * as Report from '../libs/actions/Report'; import * as Expensicons from './Icon/Expensicons'; import * as Session from '../libs/actions/Session'; +import PressableWithFeedback from './Pressable/PressableWithFeedback'; const propTypes = { /** Report to pin */ @@ -23,15 +23,18 @@ const defaultProps = { function PinButton(props) { return ( - Report.togglePinnedState(props.report.reportID, props.report.isPinned))} style={[styles.touchableButtonImage]} + accessibilityState={{checked: props.report.isPinned}} + accessibilityLabel={props.report.isPinned ? props.translate('common.unPin') : props.translate('common.pin')} + accessibilityRole="button" > - + ); }