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 5, 2022
1 parent 54dd05a commit d6e24d9
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 @@ -187,7 +187,7 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
: null,
ref: forwardedRef,
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 @@ -156,7 +156,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 d6e24d9

Please sign in to comment.