diff --git a/index.html b/index.html index dda1d88..0b438d6 100644 --- a/index.html +++ b/index.html @@ -92,7 +92,7 @@

Ruh Al Tarikh

0 - diff --git a/js/app.js b/js/app.js index 1e6898a..5abcb24 100644 --- a/js/app.js +++ b/js/app.js @@ -750,6 +750,7 @@ function openDashboard() { initAIAssistant(); DOM.dashboardModal.style.display = 'block'; DOM.dashboardModal.setAttribute('aria-hidden', 'false'); + if (DOM.dashboardBtn) DOM.dashboardBtn.setAttribute('aria-expanded', 'true'); Utils.trapFocus(DOM.dashboardModal); DOM.body.style.overflow = 'hidden'; DOM.body.classList.add('modal-open'); @@ -759,6 +760,7 @@ function closeDashboard() { if (!DOM.dashboardModal) return; DOM.dashboardModal.style.display = "none"; DOM.dashboardModal.setAttribute("aria-hidden", "true"); + if (DOM.dashboardBtn) DOM.dashboardBtn.setAttribute('aria-expanded', 'false'); DOM.body.style.overflow = ""; DOM.body.classList.remove("modal-open"); if (AppState.lastFocused) { AppState.lastFocused.focus(); AppState.lastFocused = null; } @@ -1273,7 +1275,7 @@ function bindEvents() { const key = e.key.toLowerCase(); // Handle Escape for input fields - if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') { + if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.isContentEditable) { if (key === 'escape') { e.target.blur(); if (e.target === DOM.search && DOM.searchSection && DOM.searchSection.classList.contains('active')) { @@ -1332,6 +1334,17 @@ function bindEvents() { toggleTheme(); } + // Dashboard toggle + if (key === 'd') { + if (DOM.dashboardModal) { + if (DOM.dashboardModal.style.display === 'block') { + closeDashboard(); + } else { + openDashboard(); + } + } + } + // Watch Later toggle if (key === 'b') { if (AppState.current) {