ifmeorg / ifme

Free, open source mental health communication web app to share experiences with loved ones
http://www.if-me.org/
GNU Affero General Public License v3.0
1.49k stars 744 forks source link

fixed issue in Modal component with nested interactive element #2333

Open patrikkr858 opened 2 weeks ago

patrikkr858 commented 2 weeks ago

Description

Fixed an issue in Modal component. In the Modal component, the opener element is incorrectly given a role="button," which can cause problem with accessibility if the nested element is already interactive like a button or link. To fix this, I removed the "button" role when the nested element itself is interactive and has its own role. However, we should keep the "button" role on the opener if the nested interactive element lacks a specific role. This approach ensures proper accessibility handling without redundancy.

Corresponding Issue

https://github.com/ifmeorg/ifme/issues/2123

welcome[bot] commented 2 weeks ago

Thank you for opening this pull request with us! Be sure to follow our Pull Request Practices. Let us know if you have any questions on Slack.