Skip to main content
HTML Validation

Attribute “aria-required” is unnecessary for elements that have attribute “required”.

About This HTML Issue

The aria-required attribute is used to indicate to screen reader users that a form input is required. As there is now in HTML a general required attribute which works with most user agents, it’s unnecessary to use both at the same time. In general, you can rely solely on the required attribute, unless you want to provide backwards compatibility on old screen reader software versions.

Example:

<form action="order.">
<!-- This will raise a warning on unnecesary attributes -->

  <input id="city" name="city" aria-required="true" required />

<!-- You can use this instead -->

  <input id="city" name="city" required />
</form>

Last reviewed: December 19, 2022

Was this guide helpful?

Find issues like this automatically

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

Ready to validate your sites?
Start your free trial today.