Skip to content
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

feat: mark fields as required #431

Merged
merged 3 commits into from
Sep 25, 2023
Merged

feat: mark fields as required #431

merged 3 commits into from
Sep 25, 2023

Conversation

anialesniak
Copy link
Contributor

@anialesniak anialesniak commented Sep 22, 2023

Description

Required fields are marked:

  • with required property on the element (done before this PR)
  • visual representation of the *

The asterisk is explained on the top of the form, as suggested by the design and accessibility team. In the beginning we were considering having the explanation on the first of the required fields but that approach turned out to be too complicated and/or confusing considering the conditional fields, change of order, etc.

I tested this using a Voice Over and the required attribute on the input informs that the field is required. Screen readers won’t read the * symbol.

We will need a translation for the explanation string.

Questions

I am not sure if this will behave correctly for RTL languages. I tried to test it on the existing form but I think there is more things missing, for example the labels are not moved to right, etc. But still, I am open to suggestions here!

Screenshots

Screenshot 2023-09-22 at 10 33 56

Checklist

  • 📗 all commit messages follow the conventional commits standard
  • ⬅️ changes are compatible with RTL direction
  • ♿ Changes to the UI are tested for accessibility and compliant with WCAG 2.1.
  • 📝 changes are tested in Chrome, Firefox, Safari and Edge
  • 📱 changes are responsive and tested in mobile
  • 👍 PR is approved by @zendesk/vikings

@anialesniak anialesniak marked this pull request as ready for review September 22, 2023 09:05
@anialesniak anialesniak requested a review from a team as a code owner September 22, 2023 09:05
@anpa anpa merged commit d3cbe5a into v4-alpha Sep 25, 2023
@anpa anpa deleted the alesniak_required_fields branch September 25, 2023 14:15
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.

3 participants