Browse Source

fix: video tile a11y and complete removeMedia deps

- OutputGalleryNode: add aria-label to gallery tile buttons so screen
  readers can identify video tiles (images already had alt via
  AdaptiveGalleryThumbnail)
- OutputGalleryNode: add nodeData.imageRefs and nodeData.videoRefs to
  removeMedia dependency array so splice operates on current refs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 3 months ago
parent
commit
5338e1efa7
  1. 3
      src/components/nodes/OutputGalleryNode.tsx

3
src/components/nodes/OutputGalleryNode.tsx

@ -106,7 +106,7 @@ export function OutputGalleryNode({ id, data, selected }: NodeProps<OutputGaller
setLightboxIndex(newLength - 1);
}
}
}, [displayMedia, nodeData.images, nodeData.videos, updateNodeData, id, lightboxIndex]);
}, [displayMedia, nodeData.images, nodeData.imageRefs, nodeData.videos, nodeData.videoRefs, updateNodeData, id, lightboxIndex]);
const handleExtractToInputNodes = useCallback(() => {
const galleryNode = getNodes().find((n) => n.id === id);
@ -237,6 +237,7 @@ export function OutputGalleryNode({ id, data, selected }: NodeProps<OutputGaller
<button
key={idx}
onClick={() => openLightbox(idx)}
aria-label={item.type === "video" ? `Open video ${idx + 1}` : `Open image ${idx + 1}`}
className="aspect-square rounded border border-neutral-700 hover:border-neutral-500 overflow-hidden transition-colors relative"
>
{item.type === "video" ? (

Loading…
Cancel
Save