Skip to main content
HTML Validation

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

About This HTML Issue

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

<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

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

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries