Skip to content

Commit

Permalink
added accessibility props
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Jun 13, 2023
1 parent 04959e5 commit cbb88e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/AttachmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const AttachmentView = (props) => {
<ImageView
onScaleChanged={props.onScaleChanged}
url={props.source}
fileName={props.file.name}
isAuthTokenRequired={isImage && props.isAuthTokenRequired}
/>
);
Expand Down
7 changes: 6 additions & 1 deletion src/components/ImageView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const propTypes = {

/** URL to full-sized image */
url: PropTypes.string.isRequired,

/** image file name */
fileName: PropTypes.string.isRequired,

...windowDimensionsPropTypes,
};

Expand Down Expand Up @@ -268,7 +272,6 @@ class ImageView extends PureComponent {
style={[styles.imageViewContainer, styles.overflowAuto, styles.pRelative]}
>
<PressableWithoutFeedback
accessible={false}
style={{
...StyleUtils.getZoomSizingStyle(
this.state.isZoomed,
Expand All @@ -285,6 +288,8 @@ class ImageView extends PureComponent {
}}
onPressIn={this.onContainerPressIn}
onPress={this.onContainerPress}
accessibilityRole="image"
accessibilityLabel={this.props.fileName}
>
<Image
source={{uri: this.props.url}}
Expand Down

0 comments on commit cbb88e4

Please sign in to comment.