From 74b94ccd84f1825307dda25803bb3321a4d9be32 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 10 Jun 2026 19:32:16 +0200 Subject: [PATCH] fix(journey-editor): remove-confirm focus, role=group, Escape key Focus moves to Cancel when confirm appears (no focus-drops-to-body), confirm area has role=group with aria-label, and Escape dismisses. Co-Authored-By: Claude Sonnet 4.6 --- .../src/lib/geschichte/JourneyItemRow.svelte | 9 +++- .../geschichte/JourneyItemRow.svelte.spec.ts | 54 +++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/geschichte/JourneyItemRow.svelte b/frontend/src/lib/geschichte/JourneyItemRow.svelte index d1016b83..57ea5c3e 100644 --- a/frontend/src/lib/geschichte/JourneyItemRow.svelte +++ b/frontend/src/lib/geschichte/JourneyItemRow.svelte @@ -74,9 +74,11 @@ async function handleNoteRemove() { } } -function handleRemoveClick() { +async function handleRemoveClick() { if (needsConfirmOnRemove) { showRemoveConfirm = true; + await tick(); + rootEl?.querySelector('[data-remove-confirm-cancel]')?.focus(); } else { onRemove(); } @@ -167,18 +169,21 @@ async function handleRemoveCancel() { {m.journey_item_pending_remove()} {:else if showRemoveConfirm} -
+
{m.journey_remove_confirm()}