Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ayroblu committed May 13, 2024
1 parent 36948a6 commit c41bbf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/react-native-web/src/exports/Image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ const Image: React.AbstractComponent<
React.ElementRef<typeof View>
> = React.forwardRef((props, ref) => {
const {
'aria-label': ariaLabel,
'aria-label': _ariaLabel,
accessibilityLabel,
blurRadius,
defaultSource,
draggable,
Expand All @@ -189,6 +190,7 @@ const Image: React.AbstractComponent<
style,
...rest
} = props;
const ariaLabel = _ariaLabel || accessibilityLabel;

if (process.env.NODE_ENV !== 'production') {
if (props.children) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ const emptyObject = {};
const propsToAccessibilityComponent = (
props: Object = emptyObject
): void | string => {
const roleProp = props.role || props.accessibilityRole;
// special-case for "label" role which doesn't map to an ARIA role
if (props.accessibilityRole === 'label') {
if (roleProp === 'label') {
return 'label';
}

Expand Down

0 comments on commit c41bbf5

Please sign in to comment.