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 2 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
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
1 participant