-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(InputField): add accessibility section
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
docs/src/documentation/03-components/05-input/inputfield/03-accessibility.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Accessibility | ||
redirect_from: | ||
- /components/inputfield/accessibility/ | ||
--- | ||
|
||
### Accessibility | ||
|
||
- For special cases you can use your own, detached `label`. Simply like this: | ||
|
||
```jsx | ||
<label for="NICEID">Content</label> | ||
<InputField | ||
id="NICEID" | ||
/> | ||
``` | ||
|
||
- The `ariaLabel` prop allows you to specify an `aria-label` attribute for the InputField component. This attribute provides additional information to screen readers, enhancing the accessibility of the component. By using `ariaLabel`, you can ensure that users who rely on assistive technologies receive the necessary context and information about the component's purpose and functionality. | ||
- If the `label` prop is not provided, the `ariaLabel` prop must be specified to ensure component accessibility. |