diff --git a/src/components/layout/MainLayout.tsx b/src/components/layout/MainLayout.tsx index 7995121..09c80eb 100644 --- a/src/components/layout/MainLayout.tsx +++ b/src/components/layout/MainLayout.tsx @@ -74,6 +74,12 @@ const headerIcons = { ), + close: ( + + + + + ), chevronLeft: ( @@ -465,6 +471,9 @@ export function MainLayout() { } showNotification(t('notification.data_refreshed'), 'success'); }; + const mobileSidebarToggleLabel = sidebarOpen + ? t('sidebar.toggle_collapse', { defaultValue: 'Close navigation' }) + : t('sidebar.toggle_expand', { defaultValue: 'Open navigation' }); return ( @@ -489,17 +498,20 @@ export function MainLayout() { {sidebarCollapsed ? headerIcons.chevronRight : headerIcons.chevronLeft} - + setSidebarOpen((prev) => !prev)} - title={t('sidebar.toggle_expand', { defaultValue: 'Open navigation' })} - aria-label={t('sidebar.toggle_expand', { defaultValue: 'Open navigation' })} + title={mobileSidebarToggleLabel} + aria-label={mobileSidebarToggleLabel} > - {headerIcons.menu} + {sidebarOpen ? headerIcons.close : headerIcons.menu} + + +