content/static: add empty alt text for decorative icons
The empty alt text indicates to assistive technologies
that the image is decorative and can be ignored.
Change-Id: Ia48bdfe613c25bc178f2c0c1f6c6969340f9eb0d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260726
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/content/static/html/helpers/_unit_directories.tmpl b/content/static/html/helpers/_unit_directories.tmpl
index f14825b..ca86375 100644
--- a/content/static/html/helpers/_unit_directories.tmpl
+++ b/content/static/html/helpers/_unit_directories.tmpl
@@ -7,7 +7,7 @@
{{define "unit_directories"}}
<div class="UnitDirectories" id="section-directories">
<h2 class="UnitDirectories-title">
- <img height="25px" width="20px" src="/static/img/pkg-icon-folder_20x16.svg">Directories
+ <img height="25px" width="20px" src="/static/img/pkg-icon-folder_20x16.svg" alt="">Directories
</h2>
{{if (or .Subdirectories .NestedModules) }}
<table class="UnitDirectories-table">
diff --git a/content/static/html/helpers/_unit_doc.tmpl b/content/static/html/helpers/_unit_doc.tmpl
index 4839015..2b015d5 100644
--- a/content/static/html/helpers/_unit_doc.tmpl
+++ b/content/static/html/helpers/_unit_doc.tmpl
@@ -7,7 +7,7 @@
{{define "unit_doc"}}
<div class="UnitDoc" id="section-documentation">
<h2 class="UnitDoc-title">
- <img height="25px" width="20px" src="/static/img/pkg-icon-doc_20x12.svg">Documentation
+ <img height="25px" width="20px" src="/static/img/pkg-icon-doc_20x12.svg" alt="">Documentation
</h2>
<div class="Documentation js-documentation">
{{if .DocBody.String}}
diff --git a/content/static/html/helpers/_unit_files.tmpl b/content/static/html/helpers/_unit_files.tmpl
index e155579..2f7626e 100644
--- a/content/static/html/helpers/_unit_files.tmpl
+++ b/content/static/html/helpers/_unit_files.tmpl
@@ -7,7 +7,7 @@
{{define "unit_files"}}
<div class="UnitFiles" id="section-sourcefiles">
<h2 class="UnitFiles-title">
- <img height="16px" width="12px" src="/static/img/pkg-icon-file_16x12.svg">Source Files
+ <img height="16px" width="12px" src="/static/img/pkg-icon-file_16x12.svg" alt="">Source Files
</h2>
<div>
<ul class="UnitFiles-fileList">
diff --git a/content/static/html/helpers/_unit_fixed_header.tmpl b/content/static/html/helpers/_unit_fixed_header.tmpl
index 80c8908..4fa7adf 100644
--- a/content/static/html/helpers/_unit_fixed_header.tmpl
+++ b/content/static/html/helpers/_unit_fixed_header.tmpl
@@ -34,7 +34,7 @@
{{if (eq .SelectedTab.Name "")}}
<div class="UnitHeaderFixed-detail">
<span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md">
- <img height="16px" width="16px" src="/static/img/pkg-icon-arrowBranch_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-arrowBranch_16x16.svg" alt="">
<a href="?tab=versions" tabindex="-1">Version {{.DisplayVersion}}</a>
<!-- Do not reformat the data attributes of the following div: the server uses a regexp to extract them. -->
<div class="DetailsHeader-badge $$GODISCOVERY_LATESTMINORCLASS$$"
@@ -44,11 +44,11 @@
</div>
</span>
<span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md">
- <img height="16px" width="16px" src="/static/img/pkg-icon-circularArrows_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-circularArrows_16x16.svg" alt="">
{{.LastCommitTime}}
</span>
<span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--md">
- <img height="16px" width="16px" src="/static/img/pkg-icon-scale_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-scale_16x16.svg" alt="">
{{range $i, $e := .Licenses}}
{{if $i}}, {{end}}
<a href="{{$.URLPath}}?tab=licenses#{{.Anchor}}" tabindex="-1">{{$e.Type}}</a>
@@ -61,13 +61,13 @@
</span>
{{if .Unit.IsPackage}}
<span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--lg">
- <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg" alt="">
<a href="{{$.URLPath}}?tab=imports" tabindex="-1">
{{len .Unit.Imports}} <span>Imports</span>
</a>
</span>
<span class="UnitHeaderFixed-detailItem UnitHeaderFixed-detailItem--lg">
- <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg" alt="">
<a href="{{$.URLPath}}?tab=importedby" tabindex="-1">
{{.ImportedByCount}} <span>Imported by</span>
</a>
@@ -94,7 +94,7 @@
</div>
{{else}}
<a class="UnitFixedHeader-backLink" href="?">
- <img height="16px" width="16px" src="/static/img/pkg-icon-arrowLeft_16x16.svg"> Go to main page
+ <img height="16px" width="16px" src="/static/img/pkg-icon-arrowLeft_16x16.svg" alt=""> Go to main page
</a>
{{end}}
</div>
diff --git a/content/static/html/helpers/_unit_header.tmpl b/content/static/html/helpers/_unit_header.tmpl
index 88268a4..95da358 100644
--- a/content/static/html/helpers/_unit_header.tmpl
+++ b/content/static/html/helpers/_unit_header.tmpl
@@ -49,7 +49,7 @@
{{end}}
</div>
<div class="UnitHeader-versionBanner $$GODISCOVERY_LATESTMAJORCLASS$$">
- <img height="19px" width="16px" class="UnitHeader-detailIcon" src="/static/img/pkg-icon-info_19x16.svg">
+ <img height="19px" width="16px" class="UnitHeader-detailIcon" src="/static/img/pkg-icon-info_19x16.svg" alt="">
<span>
The latest major version is <a href="/$$GODISCOVERY_LATESTMAJORVERSIONURL$$">$$GODISCOVERY_LATESTMAJORVERSION$$</a>.
</span>
@@ -58,7 +58,7 @@
{{if (eq .SelectedTab.Name "")}}
<div class="UnitHeader-detail">
<span class="UnitHeader-detailItem">
- <img class="UnitHeader-detailItemLarge" height="16px" width="16px" src="/static/img/pkg-icon-arrowBranch_16x16.svg">
+ <img class="UnitHeader-detailItemLarge" height="16px" width="16px" src="/static/img/pkg-icon-arrowBranch_16x16.svg" alt="">
<a href="?tab=versions">Version {{.DisplayVersion}}</a>
<!-- Do not reformat the data attributes of the following div: the server uses a regexp to extract them. -->
<div class="DetailsHeader-badge $$GODISCOVERY_LATESTMINORCLASS$$"
@@ -68,11 +68,11 @@
</div>
</span>
<span class="UnitHeader-detailItem">
- <img height="16px" width="16px" src="/static/img/pkg-icon-circularArrows_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-circularArrows_16x16.svg" alt="">
{{.LastCommitTime}}
</span>
<span class="UnitHeader-detailItem">
- <img height="16px" width="16px" src="/static/img/pkg-icon-scale_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-scale_16x16.svg" alt="">
{{if .Licenses}}
<a href="{{$.URLPath}}?tab=licenses">
{{range $i, $e := .Licenses}}
@@ -86,13 +86,13 @@
</span>
{{if .Unit.IsPackage}}
<span class="UnitHeader-detailItem">
- <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg" alt="">
<a href="{{$.URLPath}}?tab=imports">
{{len .Unit.Imports}} <span>Imports</span>
</a>
</span>
<span class="UnitHeader-detailItem">
- <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg">
+ <img height="16px" width="16px" src="/static/img/pkg-icon-boxClosed_16x16.svg" alt="">
<a href="{{$.URLPath}}?tab=importedby">
{{.ImportedByCount}} <span>Imported by</span>
</a>
@@ -105,7 +105,7 @@
data-version="{{.LinkVersion}}" data-mpath="{{.Unit.ModulePath}}" data-ppath="{{.Unit.Path}}" data-pagetype="{{.PageType}}">
</div>
<a class="UnitHeader-backLink" href="?">
- <img height="16px" width="16px" src="/static/img/pkg-icon-arrowLeft_16x16.svg"> Go to main page
+ <img height="16px" width="16px" src="/static/img/pkg-icon-arrowLeft_16x16.svg" alt=""> Go to main page
</a>
{{end}}
</div>
diff --git a/content/static/html/helpers/_unit_readme.tmpl b/content/static/html/helpers/_unit_readme.tmpl
index 0044555..37a87ec 100644
--- a/content/static/html/helpers/_unit_readme.tmpl
+++ b/content/static/html/helpers/_unit_readme.tmpl
@@ -7,7 +7,7 @@
{{define "unit_readme"}}
<div class="UnitReadme {{if .ExpandReadme}}UnitReadme--expanded{{end}} js-readme" id="section-readme">
<h2 class="UnitReadme-title">
- <img height="25px" width="20px" src="/static/img/pkg-icon-readme_20x16.svg">README
+ <img height="25px" width="20px" src="/static/img/pkg-icon-readme_20x16.svg" alt="">README
</h2>
{{if .Readme.String }}
<div class="UnitReadme-content">