Skip to content

Commit

Permalink
Add alt attribute to user avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
herflis committed Jan 22, 2021
1 parent 55fb1a3 commit 7dcf235
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/sensenet/src/components/UserAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ export const UserAvatar: React.FC<{
const avatarUrl = props.user.Avatar?.Url
if (avatarUrl) {
return (
<Avatar src={PathHelper.joinPaths(props.repositoryUrl, avatarUrl)} {...props.avatarProps} style={props.style} />
<Avatar
src={PathHelper.joinPaths(props.repositoryUrl, avatarUrl)}
alt={props.user.DisplayName}
{...props.avatarProps}
style={props.style}
/>
)
}
return (
Expand Down

0 comments on commit 7dcf235

Please sign in to comment.