Merge branch 'elijah-wright-patch-1' into main

zio/stable
Paul Frazee 2023-10-30 17:08:15 -07:00
commit e1dcedd87e
1 changed files with 6 additions and 6 deletions

View File

@ -52,20 +52,20 @@ export function AutoSizedImage({
if (onPress || onLongPress || onPressIn) { if (onPress || onLongPress || onPressIn) {
return ( return (
// disable a11y rule because in this case we want the tags on the image (#1640)
// eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors
<Pressable <Pressable
onPress={onPress} onPress={onPress}
onLongPress={onLongPress} onLongPress={onLongPress}
onPressIn={onPressIn} onPressIn={onPressIn}
style={[styles.container, style]} style={[styles.container, style]}>
accessible={true}
accessibilityRole="button"
accessibilityLabel={alt || 'Image'}
accessibilityHint="Tap to view fully">
<Image <Image
style={[styles.image, {aspectRatio}]} style={[styles.image, {aspectRatio}]}
source={uri} source={uri}
accessible={false} // Must set for `accessibilityLabel` to work accessible={true} // Must set for `accessibilityLabel` to work
accessibilityIgnoresInvertColors accessibilityIgnoresInvertColors
accessibilityLabel={alt}
accessibilityHint="Tap to view fully"
/> />
{children} {children}
</Pressable> </Pressable>