From 06b5ecc01499552448ab9aa179cd9082f5369cc2 Mon Sep 17 00:00:00 2001 From: NovakPAai Date: Sun, 2 Aug 2026 14:19:54 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20accessibility=20pass=20=E2=80=94=20keybo?= =?UTF-8?q?ard=20reachability=20and=20dialog=20semantics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes the gaps found in a UX audit across Overview, Projects, Sessions, and Workspace: real keyboard focus and screen-reader semantics were inconsistent — some controls had them, most didn't. - Overview: .ov-card gets a visible :focus-visible outline (it was already a real '; } var totalCells = startWeekday + daysInMonth; var remaining = (7 - (totalCells % 7)) % 7; for (var n = 1; n <= remaining; n++) { - html += '
' + n + '
'; + html += ''; } html += ''; @@ -147,8 +174,7 @@ function calPreset(days) { } renderCalendar(); onDateFilter(); - var popup = document.getElementById('calendarPopup'); - if (popup) popup.classList.remove('open'); + closeCalendar(false); // the preset button stays visually in place; no need to yank focus } function updateDateBtn() { diff --git a/src/frontend/detail.js b/src/frontend/detail.js index 3fb7cd1..92d9e6e 100644 --- a/src/frontend/detail.js +++ b/src/frontend/detail.js @@ -102,6 +102,10 @@ async function openDetail(s) { panel.classList.add('open'); overlay.classList.add('open'); + // Detail is a real dialog (role="dialog" aria-modal, index.html) — trap Tab + // inside it and return focus to whatever opened it on close, same helper + // the Add Project / Projects Settings modals use. + if (typeof _installModalFocusTrap === 'function') _installModalFocusTrap(panel); // Load messages if (s.has_detail) { @@ -194,8 +198,10 @@ async function openDetail(s) { function closeDetail() { var panel = document.getElementById('detailPanel'); var overlay = document.getElementById('overlay'); - if (panel) panel.classList.remove('open'); + if (!panel || !panel.classList.contains('open')) return; // already closed — don't steal focus back a 2nd time + panel.classList.remove('open'); if (overlay) overlay.classList.remove('open'); + if (typeof _uninstallModalFocusTrap === 'function') _uninstallModalFocusTrap(); } var structuredMessageRenderers = { diff --git a/src/frontend/index.html b/src/frontend/index.html index 6d23236..b822a16 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -249,11 +249,11 @@ - -
+ +
@@ -292,10 +292,10 @@

Delete Session?