Skip to content

Commit

Permalink
chore: Invert accessibilityLabel precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldonadel committed Sep 8, 2022
1 parent ab91e43 commit 34db210
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Libraries/Image/Image.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
selected: props['aria-selected'] ?? props.accessibilityState?.selected,
},
accessible: props.alt !== undefined ? true : props.accessible,
accessibilityLabel: props.alt ?? props.accessibilityLabel,
accessibilityLabel: props.accessibilityLabel ?? props.alt,
};

return (
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/Image.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
source={sources}
internal_analyticTag={analyticTag}
accessible={props.alt !== undefined ? true : props.accessible}
accessibilityLabel={props.alt ?? props.accessibilityLabel}
accessibilityLabel={props.accessibilityLabel ?? props.alt}
/>
);
}}
Expand Down

0 comments on commit 34db210

Please sign in to comment.