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
+3 -1
View File
@@ -15,6 +15,7 @@ export interface GeneratorProps extends React.BaseHTMLAttributes<HTMLElement> {
type: "text" | "password";
devicePSKBitCount?: number;
value: string;
id: string;
variant: "default" | "invalid";
actionButtons: {
text: string;
@@ -37,6 +38,7 @@ const Generator = React.forwardRef<HTMLInputElement, GeneratorProps>(
{
type,
devicePSKBitCount,
id = "pskInput",
variant,
value,
actionButtons,
@@ -73,7 +75,7 @@ const Generator = React.forwardRef<HTMLInputElement, GeneratorProps>(
<>
<Input
type={type}
id="pskInput"
id={id}
variant={variant}
value={value}
onChange={inputChange}