NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 1006 - input@accept
input@accept
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-04 13:18 CET by Andy R
Modified: 2015-06-28 14:03 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy R 2014-11-04 13:18:53 CET
This is an old bug, already notified and ignored. While the "accept" attribute on input type "file" accepts single and listed MIME types, it flags as an error when extensions are present in the list. More specifically, the validator considers it an error when no slash is present in the token. And as authors are encouraged to provide both extension and MIME types in the list of allowed files, it is quite a serious problem.
Comment 1 Michael[tm] Smith 2014-11-05 03:52:47 CET
(In reply to Andy R from comment #0)
> This is an old bug, already notified and ignored.

It's not been ignored. It's just not been fixed yet.

> While the "accept"
> attribute on input type "file" accepts single and listed MIME types, it
> flags as an error when extensions are present in the list. More
> specifically, the validator considers it an error when no slash is present
> in the token. And as authors are encouraged to provide both extension and
> MIME types in the list of allowed files, it is quite a serious problem.

I'm sorry it's not been fixed yet but I think it's not a particularly serious problem, and we'll get around to fixing it at some point.

In the mean time please keep in mind that the purpose of the checker isn't to give you a pass/fail certification of the correctness of your document. The purpose is to help you find unintentional mistakes. If we wanted to do the easy thing, we'd just accept any arbitrary string in the "accept" value, and any document with a file extension in the value would then pass. Doing the more-helpful thing of having it actually check that you have, e.g., ".png" in there instead of ",png" takes a little more work to code. And it will get fixed when we can make time to do it.
Comment 2 Andy R 2014-11-05 13:38:16 CET
(In reply to Michael[tm] Smith from comment #1)
I do understand the purpose of the validator, and probably now i understand it even more. But while I know that accept=".png" is a valid attribute+value, I also think that authors wishing to understand what errors they made would achieve a headache seeing the false positive with extension, and therefore they would try to fix the (false) issue by, e.g., removing the dot or so on. What is just a bug for who reports it, can become a matter of confusion for people in real need of help.
Anyway, as said, no problem if time is needed. Just a standby reply is welcome.