Skip to content

Commit

Permalink
docs(ui-form-field): fix example a11y
Browse files Browse the repository at this point in the history
Closes: INSTUI-4255
  • Loading branch information
matyasf committed Oct 10, 2024
1 parent 2160fdd commit 488202c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/ui-form-field/src/FormField/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ components. In most cases it shouldn't be used directly.
---
type: example
---
<FormField id="foo" label="Opacity" width="200px">
<input style={{display: 'block', width: '100%'}}/>
<FormField id="_foo123" label="Opacity" width="200px">
<input style={{display: 'block', width: '100%'}} id="_foo123"/>
</FormField>
```
3 changes: 2 additions & 1 deletion packages/ui-form-field/src/FormField/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import type { FormMessage } from '../FormPropTypes'
type FormFieldOwnProps = {
label: React.ReactNode
/**
* the id of the input (to link it to its label for a11y)
* the id of the input (to link it to its label for a11y).
* Applied as the `for` HTML prop on the label.
*/
id: string
/**
Expand Down

0 comments on commit 488202c

Please sign in to comment.