diff --git a/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte b/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte index 39e7e754..fd4b94f9 100644 --- a/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte +++ b/frontend/src/lib/components/chronik/ChronikFuerDichBox.svelte @@ -18,7 +18,6 @@ function verb(type: NotificationItem['type'], actor: string): string { } function href(n: NotificationItem): string { - // Link to the specific comment/reference within the document. return `/documents/${n.documentId}?commentId=${n.referenceId}`; } @@ -78,10 +77,12 @@ function href(n: NotificationItem): string {
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(); + }); });