Closed Entropiks closed 2 weeks ago
I confirm the bug - I tried to write tests using Testing Library and finished with the following error:
Found a label with the text of: Upload files, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.
solved in https://github.com/KarimMokhtar/react-drag-drop-files/pull/131 you can use v. 2.3.11
Problem It seems that the input returned by the
<FileUploader />
does not have a matching id to it's parent label prompting a warning from issues on chrome. Since the input and label are not exposed, this change should be a global fix in the repo.Error Message ( Chrome Issues Tab ) Incorrect use of
Browser Chrome Version 113.0.5672.127 (Official Build) (64-bit)
Fix The label returned from should have a for="file" prop that matches the labels input id="file" property.
Resource https://www.w3schools.com/tags/att_label_for.asp https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for