mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00:00
feat: increase accessibility with alts and labels
Can increase accessibility score in Google Lighthouse from 97% to 100% (exact score may vary depending on the site). See #1694
This commit is contained in:
1 parent
88d83a615c
commit
ca0b898cbf
3 files changed
+3
-3
No files matched your search
@@ -45,7 +45,7 @@
|
||||
{{ with $resource }}
|
||||
{{ $image := .Fill (printf "918x517 q90 %s" $anchor) }}
|
||||
<a href="{{ $item.RelPermalink }}">
|
||||
<img src="{{ $image.RelPermalink }}" class="article-banner" alt="">
|
||||
<img src="{{ $image.RelPermalink }}" class="article-banner" alt="{{ $item.Title }}">
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
{{ with $resource }}
|
||||
{{ $image := .Resize "150x" }}
|
||||
<a href="{{$link}}" {{ $target | safeHTMLAttr }}>
|
||||
<img src="{{ $image.RelPermalink }}" alt="">
|
||||
<img src="{{ $image.RelPermalink }}" alt="{{ $item.Title }}">
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<ul class="nav-icons navbar-nav flex-row ml-auto d-flex pl-md-2">
|
||||
{{ if site.Params.search.engine }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link js-search" href="#"><i class="fas fa-search" aria-hidden="true"></i></a>
|
||||
<a class="nav-link js-search" href="#" aria-label="{{ i18n "search" }}"><i class="fas fa-search" aria-hidden="true"></i></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in new issue
Block a user