From 91fc3a8bc8a6c941b34b0b1db2bd720febd504be Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 2 Jul 2026 00:16:49 +0200 Subject: [PATCH] fix: add accessible name to search and text inputs (WCAG 1.3.1) (#12869) --- app/components/Input.tsx | 12 ++++++++++++ app/components/Sharing/components/SearchInput.tsx | 1 + 2 files changed, 13 insertions(+) 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 (