feat: add keyboard accessibility to ExpandedMediaOverlay for closing with Escape key

This commit is contained in:
JoeMakuta 2026-03-27 17:51:10 +02:00
parent c76ff79bc4
commit 5f15ce9d1a

View file

@ -69,6 +69,9 @@ function ExpandedMediaOverlay({
transition={{ duration: 0.2 }}
className="fixed inset-0 z-100 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm sm:p-8"
onClick={onClose}
onKeyDown={(e) => {
if (e.key === 'Escape') onClose();
}}
>
{mediaElement}
</motion.div>,