Indicate required fields in Experiment and Scoreset forms - #717
Open
davereinhart wants to merge 3 commits into
Open
Indicate required fields in Experiment and Scoreset forms#717davereinhart wants to merge 3 commits into
davereinhart wants to merge 3 commits into
Conversation
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
marked this pull request as draft
August 19, 2026 17:59
davereinhart
marked this pull request as ready for review
August 20, 2026 15:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MvRequiredMarkercomponent, updating various form field components to support arequiredprop, and visually marking required fields in both labels and help texts.Required field indication and accessibility:
MvRequiredMarkercomponent 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]MvFloatField,MvTagField,MvUploadField, andMvMarkdownFieldcomponents to accept arequiredprop and display the required marker in labels when set. [1] [2] [3] [4] [5] [6] [7] [8]aria-requiredattributes to relevant input elements for accessibility compliance. [1] [2]Form field usage updates:
ExperimentFields.vue,ScoreSetFields.vue,ScoreSetContextFields.vue, andTargetFields.vueto set therequiredprop 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]TargetFields.vueto 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.