Form
Email address input
Published on
Description
The email input provides a text field optimized for email addresses. Mobile devices display a keyboard with the @ symbol and browsers provide built-in email format validation.
Example
Accessibility
- Use explicit
<label for="id">association with descriptive label text. - Inherit typography:
font: inherit; letter-spacing: inherit; word-spacing: inherit;for WCAG 1.4.12 compliance. - Use
autocomplete="email"to enable browser autofill. - Avoid relying on browser default validation. Use custom validation with
novalidateandaria-describedbyfor error messages.
References
- Under-Engineered Text Boxen (opens in new tab) — Adrian Roselli
- My Priority of Methods for Labeling a Control (opens in new tab) — Adrian Roselli
- Avoid Default Field Validation (opens in new tab) — Adrian Roselli
Related
- Text input — for general text
- URL input — for web addresses
Variables
None for input