From 4377ad06e84029dfb069df79462bfde025b5639b Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Fri, 5 Jan 2018 23:05:30 +0100 Subject: [PATCH] Add missing alt attr to non-decorative images These are non visual-only or not decorative-only hence context information added to alts Thanks! --- views/account/profile.pug | 2 +- views/api/facebook.pug | 2 +- views/api/index.pug | 2 +- views/partials/header.pug | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/views/account/profile.pug b/views/account/profile.pug index 77c37cc..694555e 100644 --- a/views/account/profile.pug +++ b/views/account/profile.pug @@ -37,7 +37,7 @@ block content .form-group label.col-sm-3.control-label Gravatar .col-sm-4 - img(src=user.gravatar(), class='profile', width='100', height='100') + img(src=user.gravatar(), class='profile', width='100', height='100', alt=((user.profile.name || user.email || user.id))) .form-group .col-sm-offset-3.col-sm-4 button.btn.btn.btn-primary(type='submit') diff --git a/views/api/facebook.pug b/views/api/facebook.pug index 9eb21c2..da43b2e 100644 --- a/views/api/facebook.pug +++ b/views/api/facebook.pug @@ -19,7 +19,7 @@ block content h3 i.fa.fa-user | My Profile - img.thumbnail(src=`https://graph.facebook.com/${profile.id}/picture?type=large`, width='90', height='90') + img.thumbnail(src=`https://graph.facebook.com/${profile.id}/picture?type=large`, width='90', height='90', alt=(profile.name || profile.username)) h4= profile.name h6 First Name: #{profile.first_name} h6 Last Name: #{profile.last_name} diff --git a/views/api/index.pug b/views/api/index.pug index 41e3fb0..81b2b26 100644 --- a/views/api/index.pug +++ b/views/api/index.pug @@ -9,5 +9,5 @@ block content a(href='/api/facebook', style='color: #fff') .panel.panel-default(style='background-color: #3b5998') .panel-body - img(src='http://i.imgur.com/jiztYCH.png', height=40) + img(src='http://i.imgur.com/jiztYCH.png', height=40, alt='Facebook') | Facebook diff --git a/views/partials/header.pug b/views/partials/header.pug index 6f53e5f..42ab0a2 100644 --- a/views/partials/header.pug +++ b/views/partials/header.pug @@ -27,9 +27,9 @@ li.dropdown(class=(title == 'Account Management') ? 'active' : undefined) a.dropdown-toggle(href='#', data-toggle='dropdown') if user.profile.picture - img(src=user.profile.picture) + img(src=user.profile.picture, alt=(user.profile.name || user.email || user.id)) else - img(src=user.gravatar(60)) + img(src=user.gravatar(60), alt=(user.profile.name || user.email || user.id)) span= user.profile.name || user.email || user.id i.caret ul.dropdown-menu