diff --git a/frontend/src/lib/messages.spec.ts b/frontend/src/lib/messages.spec.ts index e6d0b96c..95338e43 100644 --- a/frontend/src/lib/messages.spec.ts +++ b/frontend/src/lib/messages.spec.ts @@ -40,4 +40,32 @@ describe('message key parity', () => { expect(es).toHaveProperty('layout_menu_open'); expect(es).toHaveProperty('layout_menu_close'); }); + + // REQ-024: the timeline layer/life-event labels feed sr-only / aria text, so + // they are localized per locale (the original German-only MVP decision was + // reversed for accessibility). Pin the values so en/es can never silently + // drift back to the German source strings. + it('timeline layer/derived labels are localized per locale (REQ-024)', () => { + expect(de).toMatchObject({ + timeline_layer_world: 'Weltgeschehen', + timeline_layer_family: 'Familie', + timeline_derived_birth: 'Geburt', + timeline_derived_death: 'Tod', + timeline_derived_marriage: 'Heirat' + }); + expect(en).toMatchObject({ + timeline_layer_world: 'World events', + timeline_layer_family: 'Family', + timeline_derived_birth: 'Birth', + timeline_derived_death: 'Death', + timeline_derived_marriage: 'Marriage' + }); + expect(es).toMatchObject({ + timeline_layer_world: 'Acontecimientos mundiales', + timeline_layer_family: 'Familia', + timeline_derived_birth: 'Nacimiento', + timeline_derived_death: 'Fallecimiento', + timeline_derived_marriage: 'Matrimonio' + }); + }); });