Skip to content

Commit 8836e51

Browse files
committed
fix(hamburger): increase hit area and add aria-controls
1 parent eece240 commit 8836e51

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

site/layouts/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="hamburger-icon">
1313
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
1414
</div>
15-
<input class="hamburger-click" aria-label="site menu" type="checkbox" />
15+
<input class="hamburger-click" aria-label="toggle site menu" aria-controls="primary-menu" type="checkbox" />
1616
<ul id="primary-menu" class="flex">
1717
{{ $currentPage := . }}
1818
{{ range .Site.Menus.nav }}

src/css/_navigation.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,13 @@
147147

148148
.hamburger-click {
149149
cursor: pointer;
150+
height: 45px;
151+
width: 45px;
150152
opacity: 0.0;
151153
z-index: 2;
152154
position: absolute;
153-
top: 36px;
154-
right: 40px;
155+
top: 20px;
156+
right: 24px;
155157
}
156158

157159
@media screen and (max-width: 825px) {

0 commit comments

Comments
 (0)