At the moment, we must rely on third-party plugins or custom scripts to achieve simple image, video, or content lightboxes or sort of replicate it with modals. While this works, a native option would be better.
A built-in lightbox would ideally cover these things:
-
Performance: It would probably be more efficient compared to external plugins. Less bloat and fewer HTTP requests, keeping sites lean and fast. A native solution would integrate seamlessly and improve Core Web Vitals scores compared to typical third-party options.
-
Accessibility: Lightboxes are notorious for accessibility issues. A native version could get it right from the start, handling keyboard navigation, focus trapping, ARIA attributes, and responsive scaling. This would make sites more inclusive and aligned with modern standards.
-
Accept any Cornerstone element, not just images. That would open the door to using it for video embeds, forms, or other content.
Bonus points if it’s mobile-friendly and adaptive. For example, switching to a full-screen modal on small screens rather than a traditional “floating box.”