Textarea
What component has
Keyboard support
For detailed information about keyboard support for the Input, refer to the Keyboard control guide.
Roles and attributes
The following list describes roles and attributes that the component already has.
| Component | Role / Attribute | Usage |
|---|---|---|
Textarea | aria-invalid="false/true" | Is set to true when state="invalid" is provided; otherwise false. |
Considerations for developers
- Keep it simple - not all browsers correctly expose multiple labels that are linked to the same form element.
- Use labels for every input and make the
for=""andid=""values match. IDs must be unique on each page, only one label can be associated to each unique form element. Make required fields obvious by using an indicator – asterisk, description text, etc. - Fields with error validation should have
aria-describedbyto insure that the associated field level error message is read by assistive technology. If the error message has anid="my-error-message", then the input should havearia-describedby="my-error-message".
Find live examples in the A11y style guide.
Resources
- A11y style guide describes core principles for the accessible inputs and textarea.
- Find live examples of accessible inputs with different types in DigitalA11y project.
Other recommendations
For more accessibility recommendations, refer to the the common Accessibility guide.