pqina / filepond

🌊 A flexible and fun JavaScript file upload library
https://pqina.nl/filepond
MIT License
15.19k stars 828 forks source link

Incorrect use of <label for=FORM_ELEMENT> #929

Open syzexecutive opened 1 year ago

syzexecutive commented 1 year ago

Is there an existing issue for this?

Have you updated FilePond and its plugins?

Describe the bug

Incorrect use of label for=FORM_ELEMENT

Chrome Issues shows this error. I think it's because FilePond creates a DIV with "filepond--drop-label" class and puts the label for the file input inside it. Shouldn't the label and input be together?

Reproduction

FilePond sets file input class to filepond--browser and sets random id for it and creates a DIV with "filepond--drop-label" class and puts the label for the file input inside it.

Screenshot 2023-08-19 090827

Issues tab on Chrome:

Screenshot 2023-08-19 090716

Environment

- Device: PC
- OS: Windows 11
- Browser: Chrome 116
rikschennink commented 1 year ago

It points to an input, I don't see what's wrong with that?

syzexecutive commented 1 year ago

Yes, it points, but Chrome issues tab shows this error! How can I solve this? I have nothing special in FilePond config and configured with basics.

rikschennink commented 1 year ago

@syzexecutive Perhaps it's a Chrome bug, I wouldn't worry about it.

CelticParser commented 1 year ago

It is not a Chrome bug. form and id need to match and they do not. This error (recently) shows differently in various browsers.

This causes uploading reliability and accessibility issues.

rikschennink commented 1 year ago

@CelticParser But they do seem to match up?

CleanShot 2023-09-29 at 11 08 56@2x

simonmaass commented 8 months ago

very weird... I get the same error... but not everytime...

image
rikschennink commented 8 months ago

Seems like a bug in Chrome? The id is clearly there.