Input type file #11251
Replies: 4 comments
-
With any input, including checkbox and switch, clicking on the input label focuses/triggers the input. I believe the file upload should be consistent with this. I think that as long as you associate the label with the input properly in the markup, the label will trigger the file upload. |
Beta Was this translation helpful? Give feedback.
-
@kdinev, yes the user can make the label trigger the action. However, the user does not have control over the side text. I think not only the side text but the whole box should trigger the file upload action. If we observe the native file input we can see that the action is triggered even when we click outside of the side text. |
Beta Was this translation helpful? Give feedback.
-
@desig9stein I'll play around with ours and the native and I'll get back to you on this :) |
Beta Was this translation helpful? Give feedback.
-
I looked at this with @desig9stein and feel like we should do as he suggests. Also now that I play with the keyboard a bit more I notice that the file upload input seems to have two tab stops, it seems like the first tab focuses the button and the second one the side text (input) field. I feel that we should have just one tab stop on top of what @desig9stein suggests. |
Beta Was this translation helpful? Give feedback.
-
Question
I've noticed that the native file type input triggers the file upload even when the user clicks on the side text. In our case, only the button in the prefix triggers that action. Shouldn't we mimic the native behavior?
Beta Was this translation helpful? Give feedback.
All reactions