Fix PhotoModal accessibility and audit log RLS

This commit is contained in:
gpt-engineer-app[bot]
2025-11-02 02:42:45 +00:00
parent 9529dd340e
commit 5a2e250337

View File

@@ -1,6 +1,7 @@
import { useState, useEffect, useRef } from 'react';
import { X, ChevronLeft, ChevronRight } from 'lucide-react';
import { Dialog, DialogContent } from '@/components/ui/dialog';
import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog';
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
import { Button } from '@/components/ui/button';
import { useIsMobile } from '@/hooks/use-mobile';
@@ -83,9 +84,12 @@ export function PhotoModal({ photos, initialIndex, isOpen, onClose }: PhotoModal
return (
<Dialog open={isOpen} onOpenChange={onClose}>
<DialogContent className={`max-w-7xl w-full p-0 [&>button]:hidden ${isMobile ? 'max-h-screen h-screen' : 'max-h-[90vh]'}`}>
<DialogContent className={`max-w-7xl w-full p-0 [&>button]:hidden ${isMobile ? 'max-h-screen h-screen' : 'max-h-[90vh]'}`} aria-describedby={undefined}>
<VisuallyHidden>
<DialogTitle>Photo Viewer</DialogTitle>
</VisuallyHidden>
<div
className="relative bg-black rounded-lg overflow-hidden touch-none"
className="relative bg-black rounded-lg overflow-hidden touch-none"
onKeyDown={handleKeyDown}
onTouchStart={onTouchStart}
onTouchMove={onTouchMove}