From 1b8b77381b523fd61d7fbc3fbb9552501a08eceb Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 3 Sep 2026 05:43:26 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20filter=20ch?= =?UTF-8?q?ip=20accessibility=20and=20search=20escape=20handler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add explicit type="button" and aria-label attributes to filter chips in examples.html - Enhance global Escape keyboard shortcut in assets/js/common.js to clear search inputs and reset active filter results before blurring Co-authored-by: MilakyS <155958485+MilakyS@users.noreply.github.com> --- assets/js/common.js | 6 ++++++ examples.html | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/assets/js/common.js b/assets/js/common.js index 022a753..8b94fb5 100644 --- a/assets/js/common.js +++ b/assets/js/common.js @@ -394,6 +394,12 @@ } if (e.key === 'Escape' && isInput) { + if (active.type === 'search' || active.hasAttribute('data-example-search') || active.hasAttribute('data-change-search')) { + if (active.value !== '') { + active.value = ''; + active.dispatchEvent(new Event('input', { bubbles: true })); + } + } active.blur(); } } catch (err) {} diff --git a/examples.html b/examples.html index 154e05c..9f9a7aa 100644 --- a/examples.html +++ b/examples.html @@ -71,14 +71,14 @@

Practical MKS snippets.

- - - - - - - - + + + + + + + +