From d0dba08013e9c8de48ce0b7c9744bd46068e50cc Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Thu, 5 Jan 2023 17:16:38 -0800 Subject: [PATCH] Do not add aria-label when avatar is not interactive Signed-off-by: Christopher Ng --- src/components/NcAvatar/NcAvatar.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/NcAvatar/NcAvatar.vue b/src/components/NcAvatar/NcAvatar.vue index cd50c3ae1c..784472d549 100644 --- a/src/components/NcAvatar/NcAvatar.vue +++ b/src/components/NcAvatar/NcAvatar.vue @@ -384,10 +384,12 @@ export default { }, computed: { avatarAriaLabel() { + if (!this.hasMenu) { + return + } if (this.ariaLabel !== null) { return this.ariaLabel } - if (this.hasStatus && this.showUserStatus && this.showUserStatusCompact) { return t('Avatar of {displayName}, {status}', { displayName: this.displayName ?? this.user, status: this.userStatus.status }) }