Skip to content

Commit

Permalink
feat(image): alt text in image
Browse files Browse the repository at this point in the history
Use fallback values for alt property

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
vhemery and coderabbitai[bot] authored Nov 13, 2024
1 parent 243f6a3 commit 3a96e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/client/src/widgets/ImageWidget/component/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class ImageComponent extends React.Component<
>
{/* Used for running onImageError and onImageLoad Functions since Background Image doesn't have the functionality */}
<img
alt={this.props.alt}
alt={this.props.alt || this.props.widgetName || "Image"}
onError={this.onImageError}
onLoad={this.onImageLoad}
src={this.props.imageUrl || this.props.defaultImageUrl}
Expand Down

0 comments on commit 3a96e40

Please sign in to comment.