I am trying to create a keyboard accessible upload page using angular 2. I am having trouble to enable "Choose a file to upload" using space bar and enter keys. I am able to upload files by clicking the label.
<label for="files" > Choose a file to upload </label>
<input type="file" id="files" (click)="upload($event)"/>
The display of input is none and I am using the label to allow users to choose which file to upload. I tried onkeypress, keyup and keydown but I am not able to make it keyboard accessible for the label.