Skip to Content
UX Patterns for Devs GPT is now available! Read more →
PatternsInputs & FormsForm Validation

Form Validation

Comparison of Required Field Marking Methods

AlternativeDescriptionPros ✅Cons ❌
1️⃣ Explicit “Required” LabelDisplays “(Required)” next to the label.- Works for all users, including screen readers and color-blind users.
- No need for extra ARIA attributes.
- Takes slightly more space in the UI.
2️⃣ Asterisk (*) with ARIA ExplanationUses * but adds an aria-describedby explanation.- Keeps UI cleaner while maintaining accessibility.
- Screen readers announce “Fields marked with an asterisk are required.”
- Requires additional explanation (aria-describedby).
- Without the extra message, asterisks alone are not accessible.
3️⃣ Required Field with Visually Hidden TextUses a hidden label for screen readers but remains minimal visually.- Looks clean visually while still accessible.
- Screen readers announce it as “Email Required”.
- Not visible for sighted users who rely on visual cues.
4️⃣ Required Field with an Inline Icon + TooltipUses an asterisk (*) inside a focusable icon with a tooltip.- Visually clear while keeping text minimal.
- Works well when paired with a tooltip on hover or focus.
- Requires CSS for styling (ensuring asterisks are not the only indicator).
- Users might not see tooltip hints if they don’t hover over the icon.
5️⃣ Required Field with required Attribute OnlyUses only the required attribute without visible markers.- Works well for basic validation.
- Screen readers will announce the field as required.
- No visible indicator for sighted users before form submission.
- Errors only appear after submission, which may confuse users.
- Some browsers may not enforce required fields consistently.
Last updated on