Text inputs are used for short, free-form text data entry in a form when a user needs to add unique content that can't be predicted.
When to use this component
- When the content the user will enter can't be predicted.
When not to use this component
- When the content can be predicted and, without a predefined list, would reduce the accuracy of data collection and reporting.
Accessibility and Usability
- Ensure the field label is properly associated with the input. Do not use a placeholder attribute as this creates issues for both assistive technology users and users with cognitive disabilities.
- Clearly communicate any character limits.
- Use aria-describedby to communicate any instructions to screen reader users.