-
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
[react-aria-componets]: Checkbox imposible to visit links defined in Label #6251
Comments
I think can be related to #6235 |
@sookmax I agree with conclusing made in #1166
Unfortunatelly this label text (with link) is from api call, so it cannot be just splitted into two separate components. As result, I would accept, that this use case, will not be supported. Please let me know. In that case, I would change implementation for simple html checkbox + label. |
Links or buttons inside labels should be avoided:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#interactive_content I would consider separating that into two elements: a short label, and longer details (which includes the link). You can add an |
understand. however text with links is coming from api request and no control to separate them. ok, i will use plain checkbox |
I mean, you're just getting a string from the API, you could probably split it yourself with a regex. I'm going to close this as we won't be allowing a link in a checkbox label though, it's not accessible. |
Provide a general summary of the issue here
Checkbox manages onClick events in a way, that prevent links used in Label to be visited.
🤔 Expected Behavior?
Should be able to follow (click) link from within Label.
😯 Current Behavior
Checkbox currently checks the checkbox instead of visiting link.
💁 Possible Solution
No response
🔦 Context
I would like to create list of consents using checkboxes, where in label there can be links.
🖥️ Steps to Reproduce
Click on Link
https://codesandbox.io/p/sandbox/elastic-monad-c2chtf
Version
1.1.1
What browsers are you seeing the problem on?
Microsoft Edge
If other, please specify.
No response
What operating system are you using?
Windows 10
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: