From f589aaf96801873fbf6372c3993d064f863b3d77 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 04:17:42 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20interactive=20nav?= =?UTF-8?q?igation,=20dynamic=20title,=20and=20keyboard=20shortcuts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR implements several micro-UX and accessibility improvements: 1. **Back-to-Top Navigation**: The navbar brand logo now functions as a "Back to Top" trigger. - Added `id="navbarBrand"`, `role="button"`, `tabindex="0"`, and `aria-label="Ruh Al Tarikh - Back to Top"`. - Implemented smooth-scroll logic and mobile menu auto-close in `js/app.js`. 2. **Dynamic Document Title**: The browser tab title now updates to the current video title when a modal is open, improving tab management and screen reader context. 3. **Keyboard Shortcuts Discovery**: - Added 'S' (Share) and 'N' (Notes) shortcuts to the video modal. - Updated button `title` attributes in `index.html` to hint at these shortcuts (e.g., "Share (S)", "Notes (N)"). 4. **Code Quality**: Cleaned up 7 redundant, duplicated blocks of `episodesNavBtn` event listeners in `js/app.js` to improve maintainability. ♿ Accessibility: - Semantic roles and labels added to brand logo. - Keyboard support for all new interactions. - Screen reader friendly tab titles. Co-authored-by: ruhdevops <203426218+ruhdevops@users.noreply.github.com> --- .Jules/palette.md | 4 ++ index.html | 6 +-- js/app.js | 104 ++++++++++++---------------------------------- 3 files changed, 34 insertions(+), 80 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index 049f738..9f82d9b 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -50,3 +50,7 @@ ## 2025-05-14 - Social Sharing Implementation **Learning:** Placeholders for social sharing buttons significantly degrade UX when users expect to share discovered content. Standardizing these intents with popup windows (550x450) provides a "premium" feel while keeping users on the platform. **Action:** Always verify if sharing icons in modals are functional; if not, implement standardized platform intents using centered popups. + +## 2025-05-30 - Dynamic Document Title Management +**Learning:** In single-page applications with modal-based content viewing, updating the browser tab title to reflect the active content improves accessibility for screen readers and helps users manage multiple open tabs. +**Action:** Update `document.title` when opening significant modals (like video players) and restore it to the brand default upon closing. diff --git a/index.html b/index.html index 0b438d6..ae7fb3b 100644 --- a/index.html +++ b/index.html @@ -64,7 +64,7 @@