Adds the fallbacks for visitors without JavaScript

The mobile menu works through CSS, and controls that need JavaScript are hidden
without it. The contact photo gets its own preload, and the tests cover the new
Reveal behaviour, the first row and the noscript markup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 23:09:33 +01:00
co-authored by Claude Opus 5.5
parent 44125155bc
commit 01fcfeefea
38 changed files with 1510 additions and 67 deletions
@@ -175,4 +175,14 @@ describe('ContactDetails in the prerendered HTML', () => {
);
expect(html).not.toContain('data-testid="details"');
});
it('loads the small portrait lazily, so a hidden one is never fetched', async () => {
const html = await serverHtml(card({ portrait }));
const doc = new DOMParser().parseFromString(html, 'text/html');
expect(
doc
.querySelector('[data-testid="contact-details-portrait"]')
?.getAttribute('loading'),
).toBe('lazy');
});
});