Skip to content

Commit d0dba08

Browse files
committed
Do not add aria-label when avatar is not interactive
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent 5649184 commit d0dba08

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/NcAvatar/NcAvatar.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,12 @@ export default {
384384
},
385385
computed: {
386386
avatarAriaLabel() {
387+
if (!this.hasMenu) {
388+
return
389+
}
387390
if (this.ariaLabel !== null) {
388391
return this.ariaLabel
389392
}
390-
391393
if (this.hasStatus && this.showUserStatus && this.showUserStatusCompact) {
392394
return t('Avatar of {displayName}, {status}', { displayName: this.displayName ?? this.user, status: this.userStatus.status })
393395
}

0 commit comments

Comments
 (0)