Form
File input
Published on
Description
The file input allows users to select files from their device. It provides a browser-native file picker.
Example
Accessibility
- Use explicit
<label for="id">association. - The file input has limited styling options. Avoid hiding the native control and replacing it with a custom button — this breaks keyboard and assistive technology support.
- Communicate accepted file types and size limits via hint text using
aria-describedby.
References
- My Priority of Methods for Labeling a Control (opens in new tab) — Adrian Roselli
Related
- Text input — for text-based entries
Variables
None for input