Improve the accecibility of the mobil menu. Also switch to SVG hamburger icon that is animated.
This commit is contained in:
parent
4e4ebc19ae
commit
7f91caaf5d
1 changed files with 91 additions and 39 deletions
|
|
@ -1,12 +1,18 @@
|
|||
<div class="mobile-nav" dir="ltr">
|
||||
<div class="mobile-nav__cover"></div>
|
||||
<a href="#navigation" class="mobile-nav__toggle" aria-haspopup="true" role="button">{{ i18n "menu_mobile" }}</a>
|
||||
<div class="mobile-nav__sheet">
|
||||
<button class="mobile-nav__toggle" aria-expanded="false" aria-controls="sheet">
|
||||
{{ i18n "menu_mobile" }}
|
||||
<svg class="mobile-nav__hamburger" viewBox="0 0 100 100" focusable="false" aria-hidden="true">
|
||||
<rect width="80" height="12" x="10" y="20" rx="5"></rect>
|
||||
<rect width="80" height="12" x="10" y="45" rx="5"></rect>
|
||||
<rect width="80" height="12" x="10" y="70" rx="5"></rect>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="mobile-nav__sheet" id="sheet" aria-hidden="true">
|
||||
<div class="mobile-nav__region">
|
||||
{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end }}
|
||||
</div>
|
||||
<nav class="mobile-nav__main-menu">
|
||||
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
|
||||
<nav class="mobile-nav__main-menu" aria-label="{{ i18n "menu_title" }}">
|
||||
<ul class="mobile-nav__navbar">
|
||||
{{ if site.Menus.main -}}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue