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
@@ -262,4 +262,20 @@ describe('Testimonials in the prerendered HTML', () => {
expect(html.match(/data-testid="testimonial-/g)).toHaveLength(1);
expect(html).not.toContain('inert');
});
it('marks the controls spacer and keeps the other copies hidden in the prerendered HTML', async () => {
const html = await serverHtml(
<Testimonials content={content} testimonials={testimonials} />,
);
const doc = new DOMParser().parseFromString(html, 'text/html');
const marked = doc.querySelectorAll('[data-requires-js]');
expect(marked).toHaveLength(1);
expect(marked[0].textContent).toBe('');
const copies = [...doc.querySelectorAll('[aria-hidden="true"]')].filter(
(element) => element.querySelector('blockquote'),
);
expect(copies.length).toBeGreaterThan(0);
for (const copy of copies)
expect(copy.hasAttribute('inert')).toBe(true);
});
});
@@ -98,7 +98,7 @@ function CarouselPlaceholder({
</VisuallyHidden>
))}
{/* The control bar: 48px buttons below the same margin */}
<Box mt="clamp(2.5rem, 5vw, 4rem)" h="48px" />
<Box mt="clamp(2.5rem, 5vw, 4rem)" h="48px" data-requires-js />
</Box>
);
}