From 78b872fcf0cd7b73d335a6208d2bd381897a4e33 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 26 Jun 2026 17:11:28 +0200 Subject: feat: desktop nav submenu for nested menu items (CSS hover + focus-within) --- layouts/partials/header.html | 50 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 603f779..8ee657c 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -16,13 +16,49 @@ {{ range .Site.Menus.main }} {{ $menuPath := strings.TrimSuffix "/" .URL }} {{ $isActive := eq $menuPath $currentPath }} - - {{ i18n .Name }} - + {{ $isExternal := .Params.external }} + {{ if .HasChildren }} + {{/* CSS-only hover/focus popup. No ARIA menu roles: we do not + implement arrow-key menu semantics, so claiming role="menu" + would lie to AT. focus-within gives keyboard reveal; the + parent stays a plain navigable link. */}} +
+ + {{ i18n .Name }} + + + + +
+ {{ else }} + + {{ if $isExternal }}{{ .Name }}{{ else }}{{ i18n .Name }}{{ end }} + + {{ end }} {{ end }} -- cgit v1.2.3