feat: asterisk mandatory fields - #476
Conversation
cbf5aee to
cb9cdb1
Compare
cb9cdb1 to
36acebf
Compare
There was a problem hiding this comment.
Pull request overview
Adds visual required-field indicators (red asterisks) across multiple intake and authorization forms by introducing/propagating a required prop through shared form components and updating section/card headers.
Changes:
- Added a
requiredprop to shared form inputs (InputText/Select/InputMask/TextArea/AutoComplete) to render a required asterisk. - Marked specific fields as required in various forms/panels/cards by setting
:required="true"or adding header-level asterisks. - Updated select/input internals and several card/panel headers to display the required indicator.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/components/projectCommon/ProjectTeamAddModal.vue | Marks key contact fields as required in the add-team-member modal. |
| frontend/src/components/note/NoteForm.vue | Marks note title required; adds required indicator for the note body header. |
| frontend/src/components/form/TextArea.vue | Adds required prop and renders asterisk in the label. |
| frontend/src/components/form/Select.vue | Adds required prop and forwards it to the non-float-label internal select. |
| frontend/src/components/form/section/SubmissionStateSection.vue | Marks region/area/queue priority selects as required. |
| frontend/src/components/form/panel/ResidentialUnitsPanel.vue | Marks rental-included select as required. |
| frontend/src/components/form/panel/ProjectDescriptionPanel.vue | Adds a required asterisk to the “Additional Info” panel header. |
| frontend/src/components/form/panel/FinanciallySupportedPanel.vue | Adds required indicators for select groups and BC Housing selection. |
| frontend/src/components/form/panel/ElectrificationPanel.vue | Marks project type select as required. |
| frontend/src/components/form/panel/CompanyProjectNamePanel.vue | Marks project name and registered-business autocomplete as required. |
| frontend/src/components/form/internal/SelectInternal.vue | Adds required prop and asterisk rendering for non-floating labels. |
| frontend/src/components/form/internal/InputTextInternal.vue | Adds required prop and asterisk rendering in the label. |
| frontend/src/components/form/internal/InputMaskInternal.vue | Adds required prop and asterisk rendering in the label. |
| frontend/src/components/form/InputText.vue | Adds required prop and forwards it to the non-float-label internal input. |
| frontend/src/components/form/InputMask.vue | Adds required prop and forwards it to the non-float-label internal mask input. |
| frontend/src/components/form/common/TextAreaCard.vue | Adds required prop and renders asterisk in the card header. |
| frontend/src/components/form/common/ResidentialUnitsCard.vue | Adds required asterisk to the card title. |
| frontend/src/components/form/common/RentalUnitsCard.vue | Adds required asterisk to the card title. |
| frontend/src/components/form/common/RegisteredBusinessCard.vue | Adds required asterisk to the card title. |
| frontend/src/components/form/common/ProjectNameCard.vue | Marks project name input as required. |
| frontend/src/components/form/common/ProjectDescriptionCard.vue | Marks project description text area as required. |
| frontend/src/components/form/common/NaturalDisasterCard.vue | Adds required asterisk to the card title. |
| frontend/src/components/form/common/LocationCard.vue | Adds required asterisk to the card title. |
| frontend/src/components/form/common/FinanciallySupportedCard.vue | Adds required asterisks to legends/labels for financially-supported groups. |
| frontend/src/components/form/common/ContactCardIntakeForm.vue | Marks core contact fields/selects as required. |
| frontend/src/components/form/common/AppliedPermitsCard.vue | Adds required asterisk to the card title. |
| frontend/src/components/form/AutoComplete.vue | Adds required prop and renders asterisk in the label. |
| frontend/src/components/enquiry/EnquiryIntakeForm.vue | Marks enquiry description card as required. |
| frontend/src/components/authorization/AuthorizationStatusUpdatesCard.vue | Marks “Permit needed” select as required. |
| frontend/src/components/authorization/AuthorizationCardIntake.vue | Marks authorization selection as required. |
Comments suppressed due to low confidence (2)
frontend/src/components/form/internal/InputMaskInternal.vue:62
- The new
requiredprop currently only adds a visual asterisk; the underlying control isn’t marked as required for assistive tech. Consider addingaria-required(and only add the nativerequiredattribute if you want browser validation) on the PrimeVueInputMaskwhenrequiredis true.
<InputMask
v-model="normalizedValue"
:aria-describedby="`${name}-help`"
:aria-labelledby="`${name}-label`"
:name="name"
:mask="mask"
:placeholder="placeholder"
class="w-full"
:class="{ 'p-invalid': errorMessage }"
:disabled="disabled"
@blur="handleBlur"
frontend/src/components/form/AutoComplete.vue:83
- The new
requiredprop currently only adds a visual asterisk; the underlying autocomplete input isn’t marked as required for assistive tech. Consider wiringaria-requiredthrough to the rendered input (e.g., via component attrs / input props) whenrequiredis true.
<div>
<label
:id="`${name}-label`"
:class="{ 'font-bold': bold }"
:for="name"
>
{{ label }}
<span
v-if="required"
class="text-[var(--p-red-400)]"
>
*
</span>
</label>
<AutoComplete
v-model="value"
append-to="body"
:aria-describedby="`${name}-help`"
:aria-labelledby="`${name}-label`"
class="w-full"
:invalid="!!errorMessage"
:delay="delay"
:disabled="disabled"
:editable="editable"
:force-selection="forceSelection"
input-class="w-full"
:loading="loading"
:name="name"
:option-label="getOptionLabel"
:placeholder="placeholder"
:suggestions="suggestions"
@blur="handleBlur"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <h6 class="font-bold app-label-color"> | ||
| {{ t('note.noteForm.note') }} | ||
| <span class="text-[var(--p-red-400)]">*</span> | ||
| </h6> |
There was a problem hiding this comment.
This will be addressed in the accessibility ticket.
0db8f54 to
6b9b556
Compare
|
|
Proponent
Navigator
|
6e42c36 to
8a21520
Compare
Addressed in a separate ticket
fixed!
done! |
done!
done!
done!
fixed!
done!
done!
done! |
8a21520 to
028258a
Compare
028258a to
73ac59b
Compare
kyle1morel
left a comment
There was a problem hiding this comment.
I think we should add a support class to the theme instead of placing --p-red-400 everywhere.
Signed-off-by: Sanjay Babu <sanjaytkbabu@gmail.com>
Signed-off-by: Sanjay Babu <sanjaytkbabu@gmail.com>
Signed-off-by: Sanjay Babu <sanjaytkbabu@gmail.com>
Signed-off-by: Sanjay Babu <sanjaytkbabu@gmail.com>
73ac59b to
95c3b40
Compare
|
|





Description
PADS-826
Marked mandatory fields in forms with asterisks
Types of changes
Checklist
Further comments