-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Bug]: Native Checkbox validation errors are misaligned #10002
Comments
I just did some testing and apparently Safari (which I had no access to at the time) aligns the message at the top. So for this to work properly in all major browsers, the underlying This can also happen in other browsers, e.g. Chrome, if there is not enough space below the input. |
@jnm2377 Could this be re-opened to address alignment of validation messages that appear above the input? (See previous comment) |
Based on #15435 (comment), we still need to fix this issue with |
Package
carbon-components-react
Browser
Chrome, Firefox, Edge
Package version
v7.47.0
Description
When adding native validation errors to the checkbox, the generated notification will be misaligned because the real checkbox element is not where the visual checkbox is.
Before submit:
After submit:
Chrome/Edge
Firefox
Related issue for custom validation errors: #5390
Even if this is implemented, it would be nice if native validation were still supported.
CodeSandbox example
https://codesandbox.io/s/carbon-checkbox-validity-mw4vo
Steps to reproduce
Checkbox
componentsetCustomValidity
andreportValidity
on underlyinginput
elementCode of Conduct
The text was updated successfully, but these errors were encountered: