diff --git a/app/components/Input.tsx b/app/components/Input.tsx index f66573ccc3..99c5cf8c42 100644 --- a/app/components/Input.tsx +++ b/app/components/Input.tsx @@ -296,6 +296,16 @@ function Input( const wrappedLabel = {label}; + // Ensure the control always has an accessible name. When no visible or + // visually-hidden label is provided, fall back to the placeholder text so + // that screen readers announce a persistent name for the field. A caller + // supplied aria-label/aria-labelledby (spread via rest) still takes + // precedence over this fallback. + const fallbackAriaLabel = + !label && typeof props.placeholder === "string" + ? props.placeholder + : undefined; + return (