-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Refactor FeedbackWidget with Chakra-UI #11906
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
160c5b4
to
94242ce
Compare
@TylerAPfledderer Curious your thoughts if you see anything from that PR we should incorporate here, but I think its a bit cleaner utilizing the AlertDialog here |
@wackerow I intended to go ahead and add a story for it. I would note that The alertdialog role is used to notify users of urgent information that demands the user's immediate attention. Including role="alertdialog" on the element containing the dialog helps assistive technology identify the content as being grouped and separated from the rest of the page content. Examples include error messages that require confirmation and other action confirmation prompts. When testing with NVDA, it doesn't seem to have that kind of effect here. However, unlike the current version, a screen reader might readout everything in the modal immediately. Here are the following set of prompts NVDA gives me as soon as I select the button to open the modal:
Would be better to get proper user feedback, but this looks to be an improvement. |
@konopkja Btw, this PR fixes the bug you noted about "Closed feedback widget" events being triggered inappropriately. |
Description
Updates FeedbackWidget component, refactored using Chakra-UI AlertDialog
focus-trap-react
package previously being useduseKeyPress
hook previously being useduseOnClickOutside
hook previously being used