diff --git a/canvas/src/components/CreateWorkspaceDialog.tsx b/canvas/src/components/CreateWorkspaceDialog.tsx index ad9e6fde..37e1231d 100644 --- a/canvas/src/components/CreateWorkspaceDialog.tsx +++ b/canvas/src/components/CreateWorkspaceDialog.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState, useEffect, useRef, useCallback } from "react"; +import { useState, useEffect, useRef, useCallback, useId } from "react"; import * as Dialog from "@radix-ui/react-dialog"; import { api } from "@/lib/api"; @@ -368,9 +368,13 @@ function InputField({ type?: string; helper?: string; }) { + // useId() generates a stable, unique ID for the label↔input association, + // satisfying WCAG 2.1 SC 1.3.1 (Info and Relationships, Level A). + const inputId = useId(); + return (
-