feat(person): render precise life dates on cards, hover card, and mention dropdown

Cards compose aria-hidden * / † glyphs in markup so screen readers only
announce the dates; PersonSummaryDTO list card stays year-shaped by
design (ADR-039). MentionDropdown subtitle wraps instead of truncating
so DAY-precision ranges fit at 320px.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-12 18:14:20 +02:00
committed by marcel
parent adac1b1f99
commit 0e7095fee6
10 changed files with 254 additions and 33 deletions

View File

@@ -30,6 +30,27 @@ describe('PersonCard — confirmed person', () => {
render(PersonCard, { props: { person: makePerson() } });
await expect.element(page.getByText('unbestätigt')).not.toBeInTheDocument();
});
// PersonSummaryDTO intentionally stays year-shaped (ADR-039): the list shows
// year precision only; full dates live on the detail page.
it('renders the year-only life-date range', async () => {
render(PersonCard, { props: { person: makePerson({ birthYear: 1899, deathYear: 1972 }) } });
await expect.element(page.getByText(/1899/)).toBeVisible();
await expect.element(page.getByText(/1972/)).toBeVisible();
});
it('renders birth-only without dash and wraps glyphs in aria-hidden spans', async () => {
const { container } = render(PersonCard, {
props: { person: makePerson({ birthYear: 1899 }) }
});
await expect.element(page.getByText(/1899/)).toBeVisible();
expect(container.textContent).not.toContain('');
expect(container.textContent).not.toContain('†');
const hidden = [...container.querySelectorAll('span[aria-hidden="true"]')].map((el) =>
el.textContent?.trim()
);
expect(hidden).toContain('*');
});
});
describe('PersonCard — unconfirmed badge keys off provisional only (badge ⇔ count ⇔ triage parity)', () => {