Conversation
Issue #259: Mobile gallery not clickable in iOS Lockdown Mode Root cause: onClick on <article> element blocked by iOS Lockdown Mode security restrictions. Solution: Replace article with Next.js Link component, which renders as semantic <a> tag that works natively without JavaScript. Changes: - MobileGalleryItem now uses Link with href for navigation - onClick handler kept for analytics/sessionStorage (fires before nav) - Updated tests to check Link element instead of article - All 23 unit tests passing Benefits: - Works in iOS Lockdown Mode (Links are native HTML elements) - Better semantic HTML (<a> tag for navigation) - Maintains accessibility (Links are keyboard accessible by default) - Preserves analytics and session storage functionality
🔍 Lighthouse Performance Report❌ No Lighthouse results found. Check the workflow logs for details. This report was generated by Lighthouse CI in GitHub Actions |
🎯 Performance Budget SummaryBundle Size Analysis
Lighthouse Performance ValidationDesktop Results
Mobile Results
Performance Budget Status
Next Steps
Generated at $(date) |
🔍 Lighthouse Performance Report❌ No Lighthouse results found. Check the workflow logs for details. This report was generated by Lighthouse CI in GitHub Actions |
Applies the same Lockdown Mode fix to desktop gallery as was done for mobile in previous commit. Desktop browsers with strict security settings (Safari, Brave) also block onClick handlers on non-interactive elements. Changes: - Replace div onClick with Next.js Link component in desktop Gallery - Link renders as semantic <a> tag that works without JavaScript - Remove router.push call (navigation handled by Link href) - Remove keyboard handlers (Link provides native keyboard support) - Update tests to check Link href instead of router.push calls This fixes desktop gallery not clickable on Doctor Hubert's laptop. Related: Issue #259 (Lockdown Mode compatibility)
🔍 Lighthouse Performance Report❌ No Lighthouse results found. Check the workflow logs for details. This report was generated by Lighthouse CI in GitHub Actions |
Gallery items are now Link elements (for Lockdown Mode compatibility) instead of divs with role=button. Updated test to check for links instead of buttons, and adjusted navigation button expectations.
🔍 Lighthouse Performance Report❌ No Lighthouse results found. Check the workflow logs for details. This report was generated by Lighthouse CI in GitHub Actions |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Remove fireEvent and waitFor imports that are no longer needed after converting from onClick testing to Link href checking.
🔍 Lighthouse Performance Report❌ No Lighthouse results found. Check the workflow logs for details. This report was generated by Lighthouse CI in GitHub Actions |
Adds comprehensive regression tests to prevent reverting Link components back to onClick handlers on non-interactive elements. Unit Tests (11 tests): - Verify gallery items are Link elements (semantic <a> tags) - Verify href attributes exist for native navigation - Verify no role="button" on articles/divs - Verify JavaScript-free navigation works - Verify cross-platform consistency E2E Tests (7 scenarios): - Simulate Lockdown Mode (JavaScript disabled) - Verify strict browser security compatibility - Test keyboard accessibility - Validate SEO/crawlability with proper links These tests will catch if anyone accidentally reverts to the broken pattern that caused iOS Lockdown Mode and desktop browser security issues (Issue #259). Related: #259, #260
* test: Add regression tests for Issue #259 Lockdown Mode fix Adds comprehensive regression tests to prevent reverting Link components back to onClick handlers on non-interactive elements. Unit Tests (11 tests): - Verify gallery items are Link elements (semantic <a> tags) - Verify href attributes exist for native navigation - Verify no role="button" on articles/divs - Verify JavaScript-free navigation works - Verify cross-platform consistency E2E Tests (7 scenarios): - Simulate Lockdown Mode (JavaScript disabled) - Verify strict browser security compatibility - Test keyboard accessibility - Validate SEO/crawlability with proper links These tests will catch if anyone accidentally reverts to the broken pattern that caused iOS Lockdown Mode and desktop browser security issues (Issue #259). Related: #259, #260 * fix(analytics): disable analytics to fix gallery clicks Analytics server (analytics.idaromme.dk) is down (504 timeout), returning HTML instead of JavaScript. This causes MIME type mismatch errors that break React hydration, preventing gallery clicks from working. HOTFIX: Temporarily disable analytics script loading until server is fixed. Fixes #263
Problem
Gallery items are not clickable on browsers with Lockdown Mode or strict security settings enabled.
Affects:
Fixes #259
Root Cause
Both mobile and desktop galleries used
onClickhandlers on non-interactive HTML elements (<article>and<div>). Browsers with strict security settings (iOS Lockdown Mode, Safari/Brave with shields) block JavaScript click events on non-interactive elements as a security measure.Solution Implemented
Replace non-interactive elements with Next.js
<Link>component, which renders as semantic<a>tags that work natively without JavaScript.Technical Changes
Mobile Gallery (MobileGalleryItem.tsx)
Before (Broken in Lockdown Mode):
{/* content */} \`\`\````tsx
After (Lockdown Mode Compatible):
{/* content */} \`\`\````tsx
Desktop Gallery (Gallery.tsx)
Before (Broken with strict security):
```tsx
After (Security-compatible):
```tsx
Benefits
<a>tag for navigation (proper HTML5)Testing
Unit Tests
E2E Tests
Files Changed
src/components/mobile/Gallery/MobileGalleryItem.tsx: Use Link instead of articlesrc/components/desktop/Gallery/Gallery.tsx: Use Link instead of divsrc/components/mobile/Gallery/__tests__/MobileGalleryItem.test.tsx: Updated testssrc/components/mobile/Gallery/__tests__/MobileGallery.test.tsx: Updated teststests/integration/real-gallery-navigation.test.tsx: Updated integration testsManual Testing Required
Doctor Hubert, please test on your devices:
Desktop Testing
Mobile Testing
Browsers to Test
Deployment
Once tested and confirmed working on all devices, this can be merged and deployed.