Skip to content

Commit

Permalink
docs(InputField): add accessibility section
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkaaa committed Feb 26, 2025
1 parent 21cbc32 commit 1ecbc01
Showing 1 changed file with 19 additions and 0 deletions.
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.

0 comments on commit 1ecbc01

Please sign in to comment.