From 000333d540e0a54ce64f5b4647cad6e05e3e3f8b Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 28 Apr 2026 18:19:20 +0200 Subject: [PATCH] =?UTF-8?q?fix(stammbaum):=20WCAG=20text-[10px]=20?= =?UTF-8?q?=E2=86=92=20text-xs=20in=20PersonRelationshipsCard=20chip=20lab?= =?UTF-8?q?els?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../[id]/PersonRelationshipsCard.svelte | 4 +-- .../PersonRelationshipsCard.svelte.test.ts | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte b/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte index b57032b5..96ca77a1 100644 --- a/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte +++ b/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte @@ -37,7 +37,7 @@ function otherId(rel: RelationshipDTO): string { {#each relationships as rel (rel.id)}
  • {chipLabel(rel, personId)} @@ -57,7 +57,7 @@ function otherId(rel: RelationshipDTO): string { {#each topDerived as derived (derived.person.id)}
  • {inferredRelationshipLabel(derived.label)} diff --git a/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte.test.ts b/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte.test.ts index c23a356e..ebdd2f8a 100644 --- a/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte.test.ts +++ b/frontend/src/routes/persons/[id]/PersonRelationshipsCard.svelte.test.ts @@ -74,6 +74,35 @@ describe('PersonRelationshipsCard', () => { await expect.element(page.getByText('Elternteil von')).toBeInTheDocument(); }); + it('chip labels use text-xs (≥12px) not text-[10px] — WCAG readable font size', async () => { + render(PersonRelationshipsCard, { + personId: PERSON_ID, + relationships: [ + { + id: 'r1', + personId: PERSON_ID, + relatedPersonId: SPOUSE_ID, + personDisplayName: 'Anna', + relatedPersonDisplayName: 'Bertha', + relationType: 'SPOUSE_OF' + } + ], + inferredRelationships: [ + { + person: { id: PARENT_ID, displayName: 'Großmutter', familyMember: true }, + label: 'Großmutter', + hops: 2 + } + ] + }); + const chips = document.querySelectorAll('li span.rounded-full'); + expect(chips.length).toBeGreaterThan(0); + chips.forEach((chip) => { + expect(chip.classList.contains('text-xs')).toBe(true); + expect(chip.classList.contains('text-[10px]')).toBe(false); + }); + }); + it('shows Kind-von chip when personId is the PARENT_OF object', async () => { render(PersonRelationshipsCard, { personId: PERSON_ID,