Imporved the site

This commit is contained in:
Andreas Dahm
2026-08-26 11:26:00 +02:00
parent 888fb6289d
commit db2bc7ab97
10 changed files with 78 additions and 44 deletions

View File

@@ -40,4 +40,15 @@ describe('LanguageService', () => {
expect(translateSpy.use).toHaveBeenCalledWith('de');
expect(localStorage.getItem(LocalStoreConstants.LANGUAGE_KEY)).toBe('de');
});
it('marks the document with the active language so screen readers switch voice', () => {
localStorage.setItem(LocalStoreConstants.LANGUAGE_KEY, 'en');
const service = createService();
expect(document.documentElement.lang).toBe('en');
service.use('de');
expect(document.documentElement.lang).toBe('de');
});
});