From d80cd255d4d0a16788b84f9b85333e9a437610b8 Mon Sep 17 00:00:00 2001 From: Josh Bairstow Date: Tue, 2 Jun 2026 01:45:27 +1000 Subject: [PATCH] fix(blog): make .is-hidden global, strip HTML tags from search text, add role=search Final-review findings: - .is-hidden was scoped to blog/index.astro, so it didn't match PostRow or YearHead roots (which carry their own component scope hashes). Net effect: the filter visibly only hid the featured article, while all archive rows + year heads stayed on screen. Wrap in :global() so the runtime-toggled class actually fires its display rule everywhere. - buildSearchText regex stripped > but not <, so inline HTML open-tags like leaked into data-search. Add < to the character class so the haystack stays plain text. - Add role="search" landmark to the BlogSearch wrapper so screen-reader users can navigate to it directly. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/molecules/BlogSearch.astro | 2 +- src/pages/blog/index.astro | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/BlogSearch.astro b/src/components/molecules/BlogSearch.astro index d38b1e5..0aad4ac 100644 --- a/src/components/molecules/BlogSearch.astro +++ b/src/components/molecules/BlogSearch.astro @@ -5,7 +5,7 @@ // Filter script is added in Task 5; this file ships markup + styles only. --- -
+