Browse Source

fix accessibility issues

zwbetz-gh 5 years ago
parent
commit
5e2ff37e94
2 changed files with 3 additions and 4 deletions
  1. 0 1
      assets/js/template-dom-scripts.js
  2. 3 3
      layouts/post/single.html

+ 0 - 1
assets/js/template-dom-scripts.js

@@ -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);

+ 3 - 3
layouts/post/single.html

@@ -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>