Skip to content

Commit

Permalink
fix(file-uploader): move input outside of label to fix a11y error
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Feb 10, 2022
1 parent 32ce6c6 commit f627e1b
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/FileUploader/FileUploaderDropContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,24 @@
{labelText}
</slot>
</div>
<input
bind:this="{ref}"
type="file"
tabindex="-1"
id="{id}"
disabled="{disabled}"
accept="{accept}"
name="{name}"
multiple="{multiple}"
class:bx--file-input="{true}"
on:change
on:change="{({ target }) => {
dispatch('add', validateFiles(target.files));
}}"
on:click
on:click="{({ target }) => {
target.value = null;
}}"
/>
</label>
<input
bind:this="{ref}"
type="file"
tabindex="-1"
id="{id}"
disabled="{disabled}"
accept="{accept}"
name="{name}"
multiple="{multiple}"
class:bx--file-input="{true}"
on:change
on:change="{({ target }) => {
dispatch('add', validateFiles(target.files));
}}"
on:click
on:click="{({ target }) => {
target.value = null;
}}"
/>
</div>

0 comments on commit f627e1b

Please sign in to comment.