fix accessibility issues

This commit is contained in:
zwbetz-gh 2020-06-10 20:01:12 -05:00
parent f6708d1cf4
commit 5e2ff37e94
2 changed files with 3 additions and 4 deletions

View File

@ -70,7 +70,6 @@
var link = document.createElement('a');
link.setAttribute('href', '#' + id);
var headingText = heading.textContent;
link.setAttribute('aria-label', 'This ' + headingText + ' section');
link.innerHTML = '<svg aria-hidden="true" class="link-icon" viewBox="0 0 50 50" focusable="false"> <use xlink:href="#link"></use> </svg>';
container.appendChild(link);

View File

@ -10,18 +10,18 @@
<div class="date">
{{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
{{ $publishDate := .PublishDate }}
<strong aria-hidden="true">{{ T "publish_date" }} </strong>{{ $publishDate.Format $dateFormat }}
<strong>{{ T "publish_date" }} </strong>{{ $publishDate.Format $dateFormat }}
{{ with .Lastmod }}
{{ if gt . $publishDate }}
<br>
<strong aria-hidden="true">{{ T "last_updated" }} </strong>{{ .Format $dateFormat }}
<strong>{{ T "last_updated" }} </strong>{{ .Format $dateFormat }}
{{ end }}
{{ end }}
</div>
{{ with .Params.tags }}
<div class="tags">
<strong aria-hidden="true">{{ T "tags" }} </strong>
<strong>{{ T "tags" }} </strong>
<ul aria-label="{{ T "aria_label_tags" }}">
{{ range . }}
<li>