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

fixed issue in Modal component with nested interactive element #2333

Conversation

patrikkr858
Copy link

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

#2123

@patrikkr858 patrikkr858 linked an issue Nov 3, 2024 that may be closed by this pull request
Copy link

welcome bot commented Nov 3, 2024

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.

@patrikkr858 patrikkr858 self-assigned this Nov 3, 2024
@julianguyen julianguyen force-pushed the 2123-fix-issue-with-nested-interactive-elements-in-the-modal-component branch 4 times, most recently from 4a8788a to b834c5b Compare November 25, 2024 08:04
@julianguyen julianguyen force-pushed the 2123-fix-issue-with-nested-interactive-elements-in-the-modal-component branch from b834c5b to fb9276f Compare November 25, 2024 08:16
@julianguyen julianguyen self-requested a review November 25, 2024 08:17
@julianguyen julianguyen merged commit f1af519 into main Nov 29, 2024
6 checks passed
Copy link

welcome bot commented Nov 29, 2024

Thank you for merging this pull request with us! If you haven't already, in another pull request, please add yourself to our About page.

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.

Fix issue with nested interactive elements in the Modal component
2 participants