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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

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

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
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