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,