Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Input type=image bug #102

Open
spektred opened this issue Oct 12, 2018 · 2 comments
Open

Input type=image bug #102

spektred opened this issue Oct 12, 2018 · 2 comments

Comments

@spektred
Copy link

spektred commented Oct 12, 2018

Achecker is fine with this code. No errors.

<label for="example">Let's submit some text</label>
<input type="text" id="example" name="text">
<input type="submit" id="text" value="Send">

But if you replace the <input type="submit" id="text" value="Send"> with <input type="image" id="text" value="Send" src="image.gif" alt="image"> then it returns an error message about needing an additional label for the <input type="image"> tag!

This is wrong. According to W3C, "The element is a button, specifically a Submit Button."
https://www.w3.org/TR/html52/sec-forms.html#image-button-state-typeimage

So the image button in itself should not require a label to be added. Please fix this.

@spektred
Copy link
Author

spektred commented Oct 12, 2018

Even if you use an implicit label, it still displays an error (about needing a label) for the following code.

<label for="example">
Let's submit some text
<input type="text" id="example" name="text">
<input type="image" id="text" value="Send" src="image.gif" alt="image">
</label>

@spektred
Copy link
Author

Just a small update. I found out that adding a title="Text Here" attribute on the <input type="image"> element will silence the error. Thank goodness, I thought I was just stuck.

https://stackoverflow.com/a/20528002

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant