From 66cf38d2c8c788c9aff25e5777a564bbe5b4f826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Mon, 5 Jun 2023 16:04:52 +0200 Subject: [PATCH] migrate CategoryShortcutButton to PressableWithoutFeedback --- src/components/EmojiPicker/CategoryShortcutButton.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/EmojiPicker/CategoryShortcutButton.js b/src/components/EmojiPicker/CategoryShortcutButton.js index 567521637f19..f84771b8c9ad 100644 --- a/src/components/EmojiPicker/CategoryShortcutButton.js +++ b/src/components/EmojiPicker/CategoryShortcutButton.js @@ -1,6 +1,5 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import {Pressable} from 'react-native'; import Icon from '../Icon'; import Tooltip from '../Tooltip'; import withLocalize, {withLocalizePropTypes} from '../withLocalize'; @@ -9,6 +8,7 @@ import styles from '../../styles/styles'; import * as StyleUtils from '../../styles/StyleUtils'; import getButtonState from '../../libs/getButtonState'; import themeColors from '../../styles/themes/default'; +import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; const propTypes = { /** The emoji code of the category header */ @@ -37,7 +37,7 @@ class CategoryShortcutButton extends PureComponent { text={this.props.translate(`emojiPicker.headers.${this.props.code}`)} shiftVertical={-4} > - this.setState({isHighlighted: true})} onHoverOut={() => this.setState({isHighlighted: false})} @@ -46,6 +46,8 @@ class CategoryShortcutButton extends PureComponent { styles.categoryShortcutButton, this.state.isHighlighted && styles.emojiItemHighlighted, ]} + accessibilityLabel={`emojiPicker.headers.${this.props.code}`} + accessibilityRole="button" > - + ); }