# The “textbox” role is unnecessary for element “textarea”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/the-textbox-role-is-unnecessary-for-element-textarea
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

A `<textarea>` element already has the ARIA role `textbox`, so `role="textbox"` on it repeats what the browser tells assistive technologies anyway.

Browsers expose every `<textarea>` as a multi-line text box, together with its label, value and placeholder. Adding the role changes nothing, which is why the validator reports it as a warning and not as an error.

The attribute is often left over from a chat or comment box that started as a `<div contenteditable>`. A `<div>` has no role of its own and does need `role="textbox"`, but a real `<textarea>` doesn't. Don't swap the role for another one either: `textbox` is the only role a `<textarea>` accepts, and the validator rejects others such as `searchbox` or `combobox` with a "Bad value" error. Remove the attribute.

## Invalid example

```html
<form action="/chat">
  <label for="message">Message</label>
  <textarea id="message" name="message" rows="3" role="textbox"></textarea>
  <button type="submit">Send</button>
</form>
```

## Valid example

```html
<form action="/chat">
  <label for="message">Message</label>
  <textarea id="message" name="message" rows="3"></textarea>
  <button type="submit">Send</button>
</form>
```
