Add clear guidance on how to mark fields as Optional #7270
Replies: 3 comments
-
My take:
I've always liked NNG's advice on labeling here: https://www.nngroup.com/articles/required-fields/
and
I would propose what I was originally doing in my own form which is adding a clear and separate label, emphasized with color, for each field denoting it's necessity: It provides clear guidance, where it is expected, and with proper flex ordering can even be used in narrow mobile screens. As noted in the NNG article, accessibility can be handled separately:
Additionally, I'd recommend as a guideline that if you have < 3 fields and they are all the same level of requirement (think login form) you don't need to explicitly call out they are required or optional. |
Beta Was this translation helpful? Give feedback.
-
@JasonStoltz @julianrosado @kyrspl This feels like it belongs in the patterns repo or as a discussion - can we move it? |
Beta Was this translation helpful? Give feedback.
-
I converted this to a discussion and opened up a cooresponding request for the Design System: https://github.com/elastic/platform-ux-team/issues/216 |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
We received a question in Slack about how to mark fields as "required". It wasn't apparent to the user that our guidance is to mark optional fields instead of required fields, and beyond that, what the standard is for marking fields as optional.
In our guidance for forms, we say the following:
Reference: https://eui.elastic.co/#/forms/form-layouts/guidelines
Describe the solution you'd like
We should add additional guidance, or better yet, an example, of how to indicate form fields as "Optional".
We should first validate this by analyzing current usage in Kibana, but it would appear that the going pattern is to use the text "(Optional)" at the end of a form field.
Example: Stack Management > Rules > Create rule
Describe alternatives you've considered
N/A
Desired timeline
There is no rush to do this, but at the same time, it should be an easy thing to add to alleviate future confusion.
Additional context
https://uxdesign.cc/form-field-required-vs-optional-9b4d7cdbf400
https://uxmovement.com/forms/always-mark-optional-form-fields-not-required-ones/
Beta Was this translation helpful? Give feedback.
All reactions