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
USWDS-Site - Form templates: Add guidance for labelling required fields #1834
Conversation
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'm able to see the guidance on the Form templates preview.
For some reason clicking on Components
in preview returns a 404 for me.
---
The guidance itself looks good to me.
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.
@bonnieAcameron @mejiaj @jaclinec
Guidance looks good! I added some suggestions in the comments above.
Additionally, I believe it would make sense to update our form templates examples to match these recommendations – specifically, add the (optional)
tag to our optional fields, and make the fields in the the password reset form and sign in form required (This is at least my understanding of our guidance).
I also think it would be helpful to include a short note about required fields with a link to this guidance in the usability sections of our Address form, Name form, Password reset form, Sign-in form pages.
Let me know if you need any help with anything or if you have questions!
Co-authored-by: James Mejia <james.mejia@gsa.gov>
Co-authored-by: James Mejia <james.mejia@gsa.gov>
Co-authored-by: James Mejia <james.mejia@gsa.gov>
Co-authored-by: James Mejia <james.mejia@gsa.gov>
Co-authored-by: James Mejia <james.mejia@gsa.gov>
Co-authored-by: James Mejia <james.mejia@gsa.gov>
re-requesting reviews! |
…dated-forms-guidance
@bonnieAcameron @jaclinec @mejiaj
|
…dated-forms-guidance
It looks great! I have two observations/suggestions:
|
I agree with Bonnie's comments and otherwise think this looks good! |
I wanted to share an alternative solution. I renamed the section from "Usability guidance" to "Identifying required fields". Additionally, I removed the yellow background from the note and italicized the text. Below is a preview of what it could look like (I haven't yet pushed up any code). What do you think? |
That's the way to go in my opinion, @amyleadem ! It looks great, and I like the title. It does a much better job than "usability guidance". |
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've added Form component to preview links in PR description because it also appears there.
Everything looks good, but we should merge #2037 before this PR.
I've tested for:
- Typos
- A11Y issues
- Ran markup through HTML code sniffer
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.
Was this file deleted because none of this applies anymore?
Nevermind, I see an a11y section on both guidance pages.
…and form-templates to use shared changelog
@mejiaj I have merged the form changelogs together so that they can be shared across both the component form and template form pages. Re-requesting your review. |
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.
LGTM! Added a suggestion, but doesn't block or require a re-review.
_data/changelogs/component-form.yml
Outdated
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.
It'd be nice to have a comment at the top that says what pages this data appears on.
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.
Great idea. Added a commented note in 0c2c662
I'll draw up a changelog PR for this change. |
Summary
Added documentation about using required fields in forms.
Context
@jaclinec conducted research on best practices for required fields within forms and shared them here. We worked together to find the best place and format for this required guidance.
Preview link
Preview link:
Testing and review
Please: