fix accessibility in AutoSizedImage

This commit is contained in:
Elijah Wright
2023-10-08 14:29:20 -07:00
committed by GitHub
parent 77b21dfb1c
commit 0122cdb0b6
+4 -6
View File
@@ -56,16 +56,14 @@ export function AutoSizedImage({
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=""
/> />
{children} {children}
</Pressable> </Pressable>