From 3febef074ba2cdd98d2c71da30afc6272e71eee0 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 19 Feb 2026 13:56:07 +0000 Subject: [PATCH] Fix menu item highlighting with aria-selected attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added app_name Jinja global and aria-selected to nav menu links. Matches by first path segment (e.g. /market/... → "market") or by app_name for cross-domain cases (e.g. cart app → "cart" menu item). Co-Authored-By: Claude Opus 4.6 --- browser/templates/_types/menu_items/_nav_oob.html | 2 ++ browser/templates/_types/root/_nav.html | 2 ++ infrastructure/jinja_setup.py | 1 + 3 files changed, 5 insertions(+) diff --git a/browser/templates/_types/menu_items/_nav_oob.html b/browser/templates/_types/menu_items/_nav_oob.html index 3dfe411..eaba4f2 100644 --- a/browser/templates/_types/menu_items/_nav_oob.html +++ b/browser/templates/_types/menu_items/_nav_oob.html @@ -1,4 +1,5 @@ {% set _app_slugs = {'cart': cart_url('/')} %} +{% set _first_seg = request.path.strip('/').split('/')[0] %}