Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • html-validate
  • html-validate
  • Issues
  • #170

When using input type="submit" with a value, it is flagged as input-missing-label

I am using a standard

<input type="submit" id="submit" name="submit" value="Search/Goto">

tag. This works on text mode browsers where button may not.

Html-validate flags it with:

   122:9   error  <input> element does not have a <label>
            input-missing-label

This happens with or without prefer-button disabled.

There doesn't seem to be a way to exclude type="submit" buttons from this check. If value is not set or is empty, I think this is a useful error. So I suggest that any input that shows up as a button (submit, reset, button) and has a value should not raise this error. Similarly, type image with both alt and src should pass without an error.

Version: html-validate-7.3.3 Environment: your debian based docker with cli installed using npm. Html source: curl to web page piped into html-validate --stdin

Thanks.

-- rouilj

Assignee
Assign to
Time tracking