fix: connected labels to inputs, improving accessibility and testability
This commit is contained in:
1 parent
593c08f3e0
commit
fa85e83817
8 files changed
+34
-21
No files matched your search
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user