Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

An “input” element with a “type” attribute whose value is “hidden” must not have any “aria-*” attributes.

The aria-* attributes are part of the WAI-ARIA (Web Accessibility Initiative-Accessible Rich Internet Applications) suite. They are used to improve the accessibility of web pages. However, when we use an input element with a type attribute whose value is hidden, we imply that the element is invisible and has no interaction with the user. Therefore, it doesn’t make sense to add aria-* attributes to it.

To fix this issue, you need to remove the aria-* attributes from the input element with type=hidden. Here is an example:

<!-- Wrong code -->
<input type="hidden" name="referer" value="https://example.com" aria-invalid="false">

<!-- Correct code -->
<input type="hidden" name="referer" value="https://example.com">

Related W3C validator issues