Add aria-describedby associations
This commit is contained in:
@@ -122,6 +122,7 @@ export const InputField = forwardRef<
|
|||||||
type={type}
|
type={type}
|
||||||
checked={checked}
|
checked={checked}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
aria-describedby={description ? id + "-desc" : undefined}
|
||||||
{...rest}
|
{...rest}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -135,7 +136,11 @@ export const InputField = forwardRef<
|
|||||||
{label}
|
{label}
|
||||||
</label>
|
</label>
|
||||||
{suffix && <span>{suffix}</span>}
|
{suffix && <span>{suffix}</span>}
|
||||||
{description && <p className={styles.description}>{description}</p>}
|
{description && (
|
||||||
|
<p id={id + "-desc"} className={styles.description}>
|
||||||
|
{description}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user