From 91059843ae9122bd547ddfdfa5a30edd99a42ff7 Mon Sep 17 00:00:00 2001 From: reagenzn Date: Sat, 2 Aug 2025 00:57:32 +0900 Subject: [PATCH 01/27] fix(search): prevent Enter key handling during IME composition (#2070) Add !e.isComposing check to Enter key handler in search functionality to prevent unwanted navigation during Japanese/Asian text input composition --- quartz/components/scripts/search.inline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/components/scripts/search.inline.ts b/quartz/components/scripts/search.inline.ts index 27f74ecb8..28d47e9e2 100644 --- a/quartz/components/scripts/search.inline.ts +++ b/quartz/components/scripts/search.inline.ts @@ -220,7 +220,7 @@ async function setupSearch(searchElement: Element, currentSlug: FullSlug, data: // If search is active, then we will render the first result and display accordingly if (!container.classList.contains("active")) return - if (e.key === "Enter") { + if (e.key === "Enter" && !e.isComposing) { // If result has focus, navigate to that one, otherwise pick first result if (results.contains(document.activeElement)) { const active = document.activeElement as HTMLInputElement From 53d6e18e815be96a50270c4998175e9c10032330 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sun, 3 Aug 2025 22:44:35 -0700 Subject: [PATCH 02/27] fix(a11y): aria-controls and role fixes --- quartz/components/Explorer.tsx | 7 +++++-- quartz/components/OverflowList.tsx | 4 ++-- quartz/components/TableOfContents.tsx | 9 +++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/quartz/components/Explorer.tsx b/quartz/components/Explorer.tsx index 56784f132..e4cbcabae 100644 --- a/quartz/components/Explorer.tsx +++ b/quartz/components/Explorer.tsx @@ -55,11 +55,14 @@ export type FolderState = { collapsed: boolean } +let numExplorers = 0 export default ((userOpts?: Partial) => { const opts: Options = { ...defaultOptions, ...userOpts } const { OverflowList, overflowListAfterDOMLoaded } = OverflowListFactory() const Explorer: QuartzComponent = ({ cfg, displayClass }: QuartzComponentProps) => { + const id = `explorer-${numExplorers++}` + return (
) => { type="button" class="explorer-toggle mobile-explorer hide-until-loaded" data-mobile={true} - aria-controls="explorer-content" + aria-controls={id} > ) => { -
+