-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Dialog - accessibility: hiding modal dialog does not restore focus on the button that invoked it #4158
Comments
I'm also having some accessibilty issues using PrimeReact, such as the components have too many embedded aria attributes that NVDA reads many unnecessary information. |
@Luisa-Cavalheiro PrimeTek has this on their Roadmap for 10.0.0 Improve accessibility based on WCAG standards focusing on keyboard support and screen readers. In addition, add an accessibility section for each component documenting the keys, aria roles as well as scores from accessibility tools. I would check the PrimeVue showcase and see how things are going there as many of the fixes for accessibilty for PrimeVue are coming to PrimeReact. |
I can definitely empathize with the accessibility challenges you're facing while using Prime React. |
Describe the bug
Dialog component does not comply with accessibility when it comes to restoring the focus to the element that invoked showing the dialog after closing/hiding it.
Currently, when closing a modal dialog the focus is restored to the browser.
Reproducer
https://codesandbox.io/s/m799wh
PrimeReact version
9.2.0
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome
Steps to reproduce the behavior
Expected behavior
The expected behaviour is to restore the focus back to the button after closing the dialog
The text was updated successfully, but these errors were encountered: