Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions app/containers/RoomItem/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export const LeftActions = React.memo(({ transX, isRead, width, onToggleReadPres
const viewHeight = { height: isCondensed ? rowHeightCondensed : rowHeight };

return (
<View style={[styles.actionsContainer, styles.actionsLeftContainer]} pointerEvents='box-none'>
<View
style={[styles.actionsContainer, styles.actionsLeftContainer]}
pointerEvents='box-none'
accessibilityElementsHidden
importantForAccessibility='no'>
<Animated.View
style={[
styles.actionLeftButtonContainer,
Expand All @@ -45,7 +49,7 @@ export const LeftActions = React.memo(({ transX, isRead, width, onToggleReadPres
]}>
<View style={[styles.actionLeftButtonContainer, viewHeight]}>
<RectButton
accessible
accessible={false}
accessibilityLabel={I18n.t(isRead ? 'Mark_unread' : 'Mark_read')}
style={styles.actionButton}
onPress={onToggleReadPress}>
Expand Down Expand Up @@ -120,7 +124,11 @@ export const RightActions = React.memo(({ transX, favorite, width, toggleFav, on
const viewHeight = { height: isCondensed ? rowHeightCondensed : rowHeight };

return (
<View style={[styles.actionsLeftContainer, viewHeight]} pointerEvents='box-none'>
<View
style={[styles.actionsLeftContainer, viewHeight]}
pointerEvents='box-none'
accessibilityElementsHidden
importantForAccessibility='no'>
<Animated.View
style={[
styles.actionRightButtonContainer,
Expand All @@ -133,7 +141,7 @@ export const RightActions = React.memo(({ transX, favorite, width, toggleFav, on
animatedFavStyles
]}>
<RectButton
accessible
accessible={false}
accessibilityLabel={I18n.t(favorite ? 'Unfavorite' : 'Favorite')}
style={[styles.actionButton, { backgroundColor: colors.statusFontWarning }]}
onPress={toggleFav}>
Expand All @@ -156,7 +164,7 @@ export const RightActions = React.memo(({ transX, favorite, width, toggleFav, on
animatedHideStyles
]}>
<RectButton
accessible
accessible={false}
accessibilityLabel={I18n.t('Hide')}
style={[styles.actionButton, { backgroundColor: colors.buttonBackgroundSecondaryPress }]}
onPress={onHidePress}>
Expand Down
1 change: 1 addition & 0 deletions app/containers/RoomItem/RoomItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const RoomItem = ({
displayMode={displayMode}>
<Wrapper
accessibilityLabel={accessibilityLabel}
accessibilityHint={I18n.t('Long_press_for_more_actions')}
avatar={avatar}
type={type}
userId={userId}
Expand Down
9 changes: 8 additions & 1 deletion app/containers/RoomItem/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ import { type IWrapperProps } from './interfaces';
import styles from './styles';
import { useResponsiveLayout } from '../../lib/hooks/useResponsiveLayout/useResponsiveLayout';

const Wrapper = ({ accessibilityLabel, children, displayMode, ...props }: IWrapperProps): React.ReactElement => {
const Wrapper = ({
accessibilityLabel,
accessibilityHint,
children,
displayMode,
...props
}: IWrapperProps): React.ReactElement => {
const { colors } = useTheme();
const { rowHeight, rowHeightCondensed } = useResponsiveLayout();
return (
<View
style={[styles.container, { height: displayMode === DisplayMode.Condensed ? rowHeightCondensed : rowHeight }]}
accessibilityLabel={accessibilityLabel}
accessibilityHint={accessibilityHint}
accessible
accessibilityRole='button'>
<IconOrAvatar displayMode={displayMode} {...props} />
Expand Down
Loading
Loading