Skip to content

Commit 00602a5

Browse files
authored
fix(TitleInput): use <label> instead of <h4> for a11y (#445)
1 parent f9ce461 commit 00602a5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

frontend/app/components/redesign/components/builder/TitleInput.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,17 @@ function CustomTitle({
8080
helpText
8181
}: Omit<Props, 'suggestions'> & { placeholder: string }) {
8282
const ref = useRef<HTMLInputElement>(null)
83+
const id = 'custom-title-input'
8384
return (
8485
<div className="flex flex-col gap-xs">
85-
<h4 className="text-base leading-md font-bold text-text-primary">
86+
<label
87+
htmlFor={id}
88+
className="text-base leading-md font-bold text-text-primary"
89+
>
8690
Custom title
87-
</h4>
91+
</label>
8892
<InputField
93+
id={id}
8994
value={value}
9095
onChange={(e) => onChange(e.target.value.trim())}
9196
ref={ref}

0 commit comments

Comments
 (0)