-
Notifications
You must be signed in to change notification settings - Fork 1k
Add combobox props to MaskedInput with suggestions #7588
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
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.
lgtm
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.
Looks like we are missing an id in the MaskedInput Date, DateRange, and Filtered stories
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 seems like it announces that even when I haven't selected anything previously. Just seems a little odd. |
Taylor and I chatted more about the 'completion selected' announcement. Seems like something was changed recently in voiceover with this behavior. It also isn't consistent in how it reads out even with suggestion drop downs outside of Grommet. This behavior seems outside of our control so leaving things as they are for now. |
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.
Looks good!
What does this PR do?
Adds
combobox
props to MaskedInput (similar to TextInput logic).Slight modifications to the logic so that each mask section can appropriately inform screen reader if it's expanded.
According to ARIA documentation, an "id" is needed to associate the input with the combobox, so added "id" to the stories in MaskedInput and TextInput that involve the suggestions.
Where should the reviewer start?
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/combobox_role
What testing has been done on this PR?
Locally in SizeUnits story with VoiceOver.
How should this be manually tested?
Same as above.
Do Jest tests follow these best practices?
screen
is used for querying.asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
Closes #7573
Screenshots (if appropriate)
Do the grommet docs need to be updated?
Should this PR be mentioned in the release notes?
Yes. Fixed MaskedInput to support
combobox
aria properties for dropdown options.Is this change backwards compatible or is it a breaking change?
Backwards compatible.