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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 5. Add Items to list #20
Issue 5. Add Items to list #20
Changes from 4 commits
f49ce05
0f24cac
e32236d
854f7b8
667147e
4160494
078f475
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend moving this form to a separate component in case we use it in the future. For example, we can create a component called RadioInput. The component should use props to receive the options, like this:
and inside of the component we can use those props:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good suggestion. However, Paige and I think it's unnecessary for now simply because we don't think a radio button component will be needed in the future, based on the acceptance criteria of future issues. But, we can always keep this suggestion in mind in case it does become a necessary change in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added required so form field can't be left blank on submit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making this your default value, to enhance accessibility. This can be achieved by adding another attribute here. If you chose to do this, you'll also need to update the initial state value to be "7".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We initially leave this part of the form unselected to account for accidental form submissions where an item name would be provided but the first radio button would already be selected, before the user has a chance to select it on their own. Whereas if there is no default radio button value, the user would see an error message, asking them to select an option first. See below screenshot.
As an alternative, we added a clear "Please select option" instruction to make it clear that the user must make a selection before submitting the form. See below screenshot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trushmi What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
id
attribute to matchforHTML
attribute on<label>
for accessibilityThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added required so form field can't be left blank on submit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
id
attribute to matchforHTML
attribute on<label>
for accessibilityThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added required so form field can't be left blank on submit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
id
attribute to matchforHTML
attribute on<label>
for accessibility