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

fix: remove readonly from hidden input to pass W3C validation #3509

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AhmedElwerdany
Copy link

The readonly attribute is not allowed on input elements of type hidden, as per W3C HTML validation standards. This was causing a validation error in the W3C validator:

Error: Attribute readonly not allowed on element input at this point.

The readonly attribute has been removed from hidden inputs to resolve the issue and ensure better HTML compliance.

The `readonly` attribute is not allowed on `input` elements of type `hidden`, as per W3C HTML validation standards. This was causing a validation error in the W3C validator:

Error: Attribute readonly not allowed on element input at this point.

The `readonly` attribute has been removed from hidden inputs to resolve the issue and ensure better HTML compliance.
Copy link

vercel bot commented Oct 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 2:56am
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 2:56am

@r1nzai
Copy link

r1nzai commented Oct 8, 2024

If you remove readOnly, and change the value of the value prop, it would throw another error for not having an onChange handler

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.

2 participants