hacks-guide-minimal-mistake.../docs/_includes/masthead.html
Michael Rose aeebfaa87c Improve accessibility of navigation menu button
Add `type` and label text.

Fixes #1099
2017-10-04 11:10:41 -04:00

24 lines
No EOL
992 B
HTML

<div class="masthead">
<div class="masthead__inner-wrap">
<div class="masthead__menu">
<nav id="site-nav" class="greedy-nav">
<a class="site-title" href="{{ '/' | absolute_url }}">{{ site.title }}</a>
<ul class="visible-links">
{% for link in site.data.navigation.main %}
{% if link.url contains 'http' %}
{% assign domain = '' %}
{% else %}
{% assign domain = site.url | append: site.baseurl %}
{% endif %}
<li class="masthead__menu-item"><a href="{{ domain }}{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
</ul>
<button type="button">
<span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle Menu" }}</span>
<div class="navicon"></div>
</button>
<ul class="hidden-links hidden"></ul>
</nav>
</div>
</div>
</div>