Merge branch 'elijah-wright-patch-1' into main
commit
e1dcedd87e
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue