fix(stammbaum): WCAG text-[10px] → text-xs in PersonRelationshipsCard chip labels

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-28 18:19:20 +02:00
committed by marcel
parent 5817a79151
commit 000333d540
2 changed files with 31 additions and 2 deletions

View File

@@ -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<HTMLElement>('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,