Skip to content

Indicate required fields in Experiment and Scoreset forms - #717

Open
davereinhart wants to merge 3 commits into
release-2026.3.0from
feature/davereinhart/606/flag-required-fields
Open

Indicate required fields in Experiment and Scoreset forms#717
davereinhart wants to merge 3 commits into
release-2026.3.0from
feature/davereinhart/606/flag-required-fields

Conversation

@davereinhart

Copy link
Copy Markdown
Contributor

This pull request introduces a consistent and accessible way to indicate required fields in form components across the application. The main changes include adding a new MvRequiredMarker component, updating various form field components to support a required prop, and visually marking required fields in both labels and help texts.

Required field indication and accessibility:

  • Added a new MvRequiredMarker component that renders an asterisk and screen-reader-only "(required)" text for accessibility, and integrated it into form field labels where appropriate. [1] [2] [3] [4]
  • Updated MvFloatField, MvTagField, MvUploadField, and MvMarkdownField components to accept a required prop and display the required marker in labels when set. [1] [2] [3] [4] [5] [6] [7] [8]
  • Added aria-required attributes to relevant input elements for accessibility compliance. [1] [2]

Form field usage updates:

  • Updated usage of form field components in ExperimentFields.vue, ScoreSetFields.vue, ScoreSetContextFields.vue, and TargetFields.vue to set the required prop on fields that are mandatory, ensuring both visual and semantic indication. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
  • Updated wizard help labels in TargetFields.vue to include the required marker for required fields. [1] [2] [3]

These changes improve the user experience by clearly marking required fields and enhance accessibility for users relying on assistive technologies.

Introduce MvRequiredMarker, a shared span rendering a red asterisk with
an "(required)" screen-reader label, and wire it into the label slots of
MvFloatField, MvTagField, and MvUploadField via a new `required` prop.

MvMarkdownField forwards `required` to MvFloatField and sets
aria-required on the textarea; MvTagField does the same on its
AutoComplete input.
Set `required` on the mandatory MvFloatField, MvMarkdownField, MvTagField,
and MvUploadField instances across ExperimentFields, ScoreSetFields,
ScoreSetContextFields, TargetFields, and VariantScoreFields, so their
labels render the asterisk marker and the inputs expose aria-required.

Wizard-mode help labels for radio-group and custom fields (target
category, sequence type, reference sequence, scores file) get an explicit
MvRequiredMarker since they have no MvFloatField label to hang it on.

VariantScoreFields computes `scoresFileRequired` from
`existingVariantCount`: editing a score set that already has variants
keeps them when no new scores file is chosen, so the field is optional
there.
Add a subtitle to the ExperimentCreator and ScoreSetCreator page headers
noting that fields marked with an asterisk are required, so the markers
rendered by MvRequiredMarker have a legend.
@davereinhart
davereinhart marked this pull request as draft August 19, 2026 17:59
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 10.274%. remained the same — feature/davereinhart/606/flag-required-fields into release-2026.3.0

@davereinhart
davereinhart marked this pull request as ready for review August 20, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show required fields to user on ScoreSetCreator and ExperimentCreator components

2 participants