summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-03-01 16:59:09 -0800
committerChristopher Ng <chrng8@gmail.com>2023-03-03 13:22:14 -0800
commit9d904b144bde5f9aac440a30fea2a8f25f72eed6 (patch)
tree17924457c4296037992aff7978d0bd098379eea6 /core/src
parentc5da4b8737a7463b1920ab20e5a73abd608f520e (diff)
downloadnextcloud-server-9d904b144bde5f9aac440a30fea2a8f25f72eed6.tar.gz
nextcloud-server-9d904b144bde5f9aac440a30fea2a8f25f72eed6.zip
Add avatar contact img description
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/contactsmenu.js5
-rw-r--r--core/src/OC/contactsmenu/contact.handlebars4
2 files changed, 7 insertions, 2 deletions
diff --git a/core/src/OC/contactsmenu.js b/core/src/OC/contactsmenu.js
index b9f4b0fc064..58d319a03c0 100644
--- a/core/src/OC/contactsmenu.js
+++ b/core/src/OC/contactsmenu.js
@@ -55,6 +55,11 @@ const Contact = Model.extend({
} else {
this.set('hasManyActions', true)
}
+
+ const fullName = this.get('fullName')
+ if (this.get('avatar') && fullName) {
+ this.set('avatarLabel', t('core', 'Avatar of {fullName}', { fullName }))
+ }
}
})
diff --git a/core/src/OC/contactsmenu/contact.handlebars b/core/src/OC/contactsmenu/contact.handlebars
index afb2f627663..483cb3e93d5 100644
--- a/core/src/OC/contactsmenu/contact.handlebars
+++ b/core/src/OC/contactsmenu/contact.handlebars
@@ -2,11 +2,11 @@
{{#if contact.profileUrl}}
{{#if contact.profileTitle}}
<a class="profile-link--avatar" href="{{contact.profileUrl}}">
- <img src="{{contact.avatar}}&size=32" class="avatar" srcset="{{contact.avatar}}&size=32 1x, {{contact.avatar}}&size=64 2x, {{contact.avatar}}&size=128 4x" alt="">
+ <img src="{{contact.avatar}}&size=32" class="avatar" srcset="{{contact.avatar}}&size=32 1x, {{contact.avatar}}&size=64 2x, {{contact.avatar}}&size=128 4x" alt="{{contact.avatarLabel}}">
</a>
{{/if}}
{{else}}
- <img src="{{contact.avatar}}&size=32" class="avatar" srcset="{{contact.avatar}}&size=32 1x, {{contact.avatar}}&size=64 2x, {{contact.avatar}}&size=128 4x" alt="">
+ <img src="{{contact.avatar}}&size=32" class="avatar" srcset="{{contact.avatar}}&size=32 1x, {{contact.avatar}}&size=64 2x, {{contact.avatar}}&size=128 4x" alt="{{contact.avatarLabel}}">
{{/if}}
{{else}}
{{#if contact.profileUrl}}