Textarea
A multiline text input control most commonly used within a form.
Page sections
Type
Default
Usage
Textareas are used for prompting the user to enter sizable amounts of free-form text such as:
- Ratings
- Messages to providers
Avoid using text input for potentially single-value text, like phone numbers or email addresses. Use text input instead.
Behavior
Textarea can be developed to display an error on specific input conditions.
Visual style
Textareas can be variable width and should align to the content they’re paired with when appropriate.
Content strategy
- Use Title Case for labels
- Use Sentence case for more editorial, instructional placeholder
- Follow normal casing, grammar, and punctuation practices (e.g. use a period for full sentences)
- Adhere to parallel syntax when authoring multiple text fields on a single page / screen
Accessibility
Characteristics
- Label should be programmatically associated with the textarea
- Required or optional field in indicated
- Clicking on label shifts focus to the textarea
Keyboard/focus expectations
- Receives focus when tabbed to
Screen reader expectations
- Label is announced. Ex. “Comments…”
- Constraints; maximum number of characters, if field is required, Characters remaining etc. Ex. “…(Optional), textarea, maximum of 1000 characters, edit”