From 42d58724aa91fd80d596633e769eacf8c7afd6bc Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 05:44:35 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20search=20Es?= =?UTF-8?q?cape=20handling=20&=20screen=20reader=20label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Clear search input query on Escape key press before blurring - Remove keyboard shortcut hint '(/)' from changelog search input aria-label Co-authored-by: MilakyS <155958485+MilakyS@users.noreply.github.com> --- .jules/palette.md | 4 ++++ assets/js/changelog.js | 5 +++-- assets/js/common.js | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.jules/palette.md b/.jules/palette.md index 8a39b27..80fc324 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -17,3 +17,7 @@ ## 2026-05-24 - Consistent Search Empty States **Learning:** Implementing localized empty states for search/filter views using a shared design component (`.reworking-container`) and `aria-live="polite"` ensures that users receive immediate, accessible feedback when no results match their query, maintaining visual consistency across the application. **Action:** Always provide a localized empty state with appropriate ARIA live regions for interactive lists that can be filtered to zero results. + +## 2026-09-02 - Search Keyboard Escape & ARIA Hint Separation +**Learning:** Appending visual keyboard hints (such as `(/)`) directly to `aria-label` causes screen readers to read shortcut syntax as part of the element's accessible name. Keeping `aria-label` concise (e.g. "Search changelog...") while leaving shortcut hints in `placeholder` preserves screen reader clarity. Additionally, handling `Escape` on search inputs to clear query values before blurring provides a familiar, fluid search experience. +**Action:** Exclude keyboard shortcut hints from `aria-label` and handle `Escape` key events on search inputs to clear non-empty queries prior to blurring focus. diff --git a/assets/js/changelog.js b/assets/js/changelog.js index 657ada6..ddeefc8 100644 --- a/assets/js/changelog.js +++ b/assets/js/changelog.js @@ -94,12 +94,13 @@ function renderHero(hero, stats) { function renderFilters(releases) { const allLabel = window.MKSSiteI18n?.get('filters.all', 'all'); const tags = [allLabel, ...new Set((releases || []).map(item => item.tag).filter(Boolean))]; - const searchPlaceholder = (window.MKSSiteI18n?.get('changelog.search', 'Search changelog...') || 'Search changelog...') + ' (/)'; + const searchBase = window.MKSSiteI18n?.get('changelog.search', 'Search changelog...') || 'Search changelog...'; + const searchPlaceholder = searchBase + ' (/)'; return `
- +
${tags.map((tag, index) => `