You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is a label element and a input element and both are "linked" with the same id then clicking the label element should move the focus to the input element. This will happen if the user has enabled javascript but not when the user has disabled js.
Expected behavior
Clicking the label should focus the checkbox or any other input element.
Swap out the rendered span element with a label element.
Additional context
Your environment
Software
Name(s)
Version
Radix Package(s)
1.0.0
React
n/a
18
Browser
chrome
n/a
Assistive tech
n/a
n/a
Node
n/a
n/a
npm/yarn
yarn
n/a
Operating System
MacOS
Monterey
The text was updated successfully, but these errors were encountered:
Haberkamp
changed the title
Label not working when JS is disabled in the browser
[Label] Is not working when JS is disabled in the browser
Jul 26, 2022
Hi @Haberkamp, Thanks for raising, this would be due to Radix opting not to render a native label for the accessibility reasons described in #638 (comment) , though it's on our list to revisit this and test whether this has improved since #1233 (comment)
For now I'm going to close this as duplicate as it is covered by #1233
Edit – I noticed you already described this cause / solution in your description, hopefully my comment is helpful anyway.
Bug report
Current Behavior
When there is a label element and a input element and both are "linked" with the same id then clicking the label element should move the focus to the input element. This will happen if the user has enabled javascript but not when the user has disabled js.
Expected behavior
Clicking the label should focus the checkbox or any other input element.
Reproducible example
CodeSandbox Template
Suggested solution
Swap out the rendered
span
element with alabel
element.Additional context
Your environment
The text was updated successfully, but these errors were encountered: