Page MenuHomePhabricator

Signify to users which fields are required
Closed, ResolvedPublic

Description

Context
Currently, for all forms, there is no way of knowing which fields are required for submission until you interact with them. To improve this experience for users, we should provide them context for which fields they are required before filling out the form.

Acceptance Criteria

  • Asterisk appears next to field labels that are required

Related Objects

StatusSubtypeAssignedTask
ResolvedGoalbd808
Resolved• sdkim

Event Timeline

  • Is this a design change to be made to all required fields on all forms in the UI?
  • Does it go after the field label or after the field itself?
  • Should all form containing pages also provide a footer/header message with the form explaining that the asterisk indicates a required field?

Related: (found via https://stackoverflow.com/questions/52158705/vuetify-how-to-mark-field-as-required)

The required prop no longer explicitly adds an asterisk to the label. All of its functionality to validation was removed for v1.0. -- https://github.com/vuetifyjs/vuetify/releases/tag/v1.1.0

The required fields are marked as such in the Vue/Vuetify source we emit, but the upstream UI widget library removed this pre-interaction visual signal. The current behavior (again from the upstream library) is to show the "This field is required." message and red indicator color on blur or on submit cancellation.

Is this a design change to be made to all required fields on all forms in the UI?

Yes, I realized for the add/remove tool form we should apply it to required fields as well

Does it go after the field label or after the field itself?

As suggested by Bárbara Martínez, sr. ux designer, it should go after the label. She also indicates that the label should not disappear when the user interacts with the field. @bd808 @Raymond_Ndibe is this something that is available via Vuetify? Otherwise, we might consider pulling the fields out of the input box.

Should all form containing pages also provide a footer/header message with the form explaining that the asterisk indicates a required field?

I don't think we need to since the error message "This field is required" appears below the field upon clicking out of the field.

• sdkim renamed this task from Add asterisk to signify Title field is required to Signify to users which fields are required.Nov 23 2021, 5:41 PM
• sdkim updated the task description. (Show Details)

Does it go after the field label or after the field itself?

As suggested by Bárbara Martínez, sr. ux designer, it should go after the label. She also indicates that the label should not disappear when the user interacts with the field.

What does "the label should not disappear when the user interacts with the field" mean? Is this something that is happening now?

@bd808 @Raymond_Ndibe is this something that is available via Vuetify? Otherwise, we might consider pulling the fields out of the input box.

I don't understand what is being asked actually, but "consider pulling the fields out of the input box" sounds like a call to build our own form widget framework?

Toolhub is using Vuetify which is a Vue library providing a rich framework of components based on Material Design. We are using form widgets from the upstream library which manage things like connecting the label for an input with the input itself. As implemented by Vuetify, filed labels generally start with a placement similar to placeholder text on an unstyled form input and then reactively elevate the label to a position above the input when focused and after input has been placed in the fields content area. I would recommend looking at the upstream demo pages for forms (https://vuetifyjs.com/en/components/forms/) to help gain an understanding of what affordances they natively provide.

What does "the label should not disappear when the user interacts with the field" mean? Is this something that is happening now?

Ah, I'm sorry. Today, the field label already behaves as expected.

image.png (496×208 px, 15 KB)

The only ask within the scope of this card is to ensure all required fields have an asterisk appended to the field label

Change 741994 had a related patch set uploaded (by Raymond Ndibe; author: Raymond Ndibe):

[wikimedia/toolhub@main] ui: add asterisk to signify field is required

https://gerrit.wikimedia.org/r/741994

Change 741994 merged by jenkins-bot:

[wikimedia/toolhub@main] ui: add asterisk to signify field is required

https://gerrit.wikimedia.org/r/741994

bd808 moved this task from In Progress to Review on the Toolhub board.
bd808 updated Other Assignee, added: Raymond_Ndibe.

Changes available on https://toolhub-demo.wmcloud.org/ for acceptance testing.

• sdkim updated the task description. (Show Details)

✅ Acceptance Testing

Change 749220 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/deployment-charts@master] toolhub: Bump container version to 2021-12-20-122341-production

https://gerrit.wikimedia.org/r/749220

Change 749220 merged by jenkins-bot:

[operations/deployment-charts@master] toolhub: Bump container version to 2021-12-23-121200-production

https://gerrit.wikimedia.org/r/749220