A type of input that allows free-form text as its value.
If the aria-multiline attribute is true, the widget accepts line breaks within the input, as in an HTML textarea. Otherwise, this is a simple text box. The intended use is for languages that do not have a text input element, or cases in which an element with different semantics is repurposed as a text field.
Note: In most user agent implementations, the default behavior of the ENTER or RETURN key is different between the single-line and multi-line text fields in HTML. When user has focus in a single-line <input type=”text”> element, the keystroke usually submits the form. When user has focus in a multi-line <textarea> element, the keystroke inserts a line break. The WAI-ARIA textbox role differentiates these types of boxes with the aria-multiline attribute, so authors are advised to be aware of this distinction when designing the field.
- XForms input
- HTML textarea
- HTML input[type=”text”]
Supported States and Properties
Inherited States and Properties
- aria-busy (state)
- aria-current (state)
- aria-disabled (state)
- aria-grabbed (state)
- aria-hidden (state)
- aria-invalid (state)
Accessible Name Required
Use the HTML <input type=“text”> or <textarea> tag.
<input type=”text” name=”firstname”><br>
<input type=”text” name=”lastname”>
rows=”10″ cols=”50″>Write something here</textarea>
- W3C (opens new window)