From 58ea2f827ac0b9590bd3bde0a39118fa11f691fb Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 20 Apr 2026 18:05:28 +0200 Subject: [PATCH] =?UTF-8?q?fix(chronik):=20split=20F=C3=BCr-dich=20row=20m?= =?UTF-8?q?arkup=20=E2=80=94=20Dismiss=20is=20sibling=20of=20link,=20not?= =?UTF-8?q?=20nested?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HTML5 forbids interactive content ( markup triggered two concrete bugs flagged by Felix, Nora, and Leonie in PR #288 review: - Browsers inconsistently route the nested click: on some engines the stopPropagation() still bubbles, and the user navigates into the document instead of dismissing. - The senior audience (60+) tap-selects with a slight drag, and the OS treats the interaction as anchor vs. button inconsistently — a reproducible usability failure Leonie has seen in testing before. Refactor to the Option-C layout from issue #285 comment #3573: outer
  • flex container, wrapping avatar + body + time, +
  • {/each} diff --git a/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte.spec.ts b/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte.spec.ts index c8f709a8..edb53951 100644 --- a/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte.spec.ts +++ b/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte.spec.ts @@ -113,4 +113,17 @@ describe('ChronikFuerDichBox', () => { expect(onMarkRead).toHaveBeenCalledTimes(1); expect(onMarkRead.mock.calls[0][0]).toEqual(n); }); + + it('Dismiss button is a sibling of the document link, never nested inside ', async () => { + render(ChronikFuerDichBox, { + unread: [notif({ id: 'x' })], + onMarkRead: vi.fn(), + onMarkAllRead: vi.fn() + }); + const dismiss = document.querySelector('[data-testid="chronik-fuerdich-dismiss"]'); + expect(dismiss).not.toBeNull(); + // HTML spec forbids interactive content descendants of . + // Prevents the senior-audience tap-drag bug flagged by Leonie. + expect(dismiss?.closest('a')).toBeNull(); + }); });