About This HTML Issue
An <input type="button"> element requires a non-empty value attribute because that attribute provides the button's visible label and its accessible name.
Unlike <input type="submit">, which defaults to a browser-provided label like "Submit", <input type="button"> has no default label. Without a value, the button renders as an empty rectangle with no text, and assistive technologies have nothing to announce to the user. The W3C validator flags this as an error because the HTML specification mandates that <input type="button"> must have a value attribute, and it must not be empty.
If you need a button without visible text (for example, an icon-only button), use a <button> element instead. The <button> element can contain child elements like <img> or <span>, and you can give it an accessible name through aria-label or visually hidden text. The <input> element cannot contain child content, so value is its only mechanism for labeling.
Invalid example
<input type="button" onclick="doSomething()">
Valid examples
Add a non-empty value attribute:
<input type="button" value="Click me" onclick="doSomething()">
Or switch to a <button> element, which is more flexible:
<button type="button" onclick="doSomething()">Click me</button>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.