fix: connected labels to inputs, improving accessibility and testability

This commit is contained in:
Dan Ditomaso
2025-02-28 14:59:17 -05:00
parent 593c08f3e0
commit fa85e83817
8 changed files with 34 additions and 21 deletions
@@ -11,6 +11,7 @@ import { Controller, type FieldValues } from "react-hook-form";
export interface PasswordGeneratorProps<T> extends BaseFormBuilderProps<T> {
type: "passwordGenerator";
id: string;
hide?: boolean;
bits?: { text: string; value: string; key: string }[];
devicePSKBitCount: number;
@@ -41,6 +42,7 @@ export function PasswordGenerator<T extends FieldValues>({
render={({ field: { value, ...rest } }) => (
<Generator
type={field.hide && !passwordShown ? "password" : "text"}
id={field.id}
action={
field.hide
? {