Skip to content

Commit 1748296

Browse files
committed
Add avatar contact img description
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent 2564d7f commit 1748296

6 files changed

Lines changed: 13 additions & 8 deletions

File tree

core/src/OC/contactsmenu.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ const Contact = Model.extend({
5555
} else {
5656
this.set('hasManyActions', true)
5757
}
58+
59+
const fullName = this.get('fullName')
60+
if (this.get('avatar') && fullName) {
61+
this.set('avatarLabel', t('core', 'Avatar of {fullName}', { fullName }))
62+
}
5863
}
5964
})
6065

core/src/OC/contactsmenu/contact.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
{{#if contact.profileUrl}}
33
{{#if contact.profileTitle}}
44
<a class="profile-link--avatar" href="{{contact.profileUrl}}">
5-
<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="">
5+
<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}}">
66
</a>
77
{{/if}}
88
{{else}}
9-
<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="">
9+
<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}}">
1010
{{/if}}
1111
{{else}}
1212
{{#if contact.profileUrl}}

dist/core-login.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-login.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)