Skip to content

Commit

Permalink
fix(ui5-avatar): announce initials (#10755)
Browse files Browse the repository at this point in the history
Fixes: #10641
  • Loading branch information
yanaminkova authored and ilhan007 committed Feb 5, 2025
1 parent ed917fb commit 39166a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/main/src/Avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ class Avatar extends UI5Element implements ITabbable, IAvatarGroupItem {
return this.accessibleName;
}

return Avatar.i18nBundle.getText(AVATAR_TOOLTIP) || undefined;
const defaultLabel = Avatar.i18nBundle.getText(AVATAR_TOOLTIP);

return this.initials ? `${defaultLabel} ${this.initials}`.trim() : defaultLabel;
}

get hasImage() {
Expand Down

0 comments on commit 39166a9

Please sign in to comment.