-
Notifications
You must be signed in to change notification settings - Fork 520
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
feat(Form): use nuxt useId
to bind input labels
#1211
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
@romhml https://nuxt.com/blog/v3-10#ssr-safe-accessible-unique-id-creation π₯ I've updated nuxt to |
Great π! I'll wrap this up! |
Let me know how it goes! On my side, I'll try to use this composable to fix all the Headless UI hydration issues since Vue 3.4. |
- Removed nuxt dependency overrides to fix useId errors - Updated useId imports to "#app"
@benjamincanac I had to remove the dependencies overrides for nuxt/kit and nuxt/schema for useId to fix this error. Also unpinned vue since we should not have any more hydration issues, which caused type issues. Do you have any insights on this? Especially this one: https://github.com/nuxt/ui/actions/runs/7719033426/job/21041516307?pr=1211#step:11:16 |
I've updated the resolutions, sorry I missed that on the upgrade! The typecheck errors should be gone too if you update your branch from The hydration issues won't be fixed until we take advantage of |
@@ -1,18 +1,18 @@ | |||
<template> | |||
<form @submit.prevent="onSubmit"> | |||
<form :id="formId" @submit.prevent="onSubmit"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add an id
to the form here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it, it was a leftover from a test to check for hydration issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useId
to bind input labels
useId
to bind input labelsuseId
to bind input labels
Thanks @romhml! π |
Sorry for spamming. Just wondering if there is a way to see when this will be shipped. Is there a way to check the version this will be shipped at? |
This will be released tomorrow in the |
π Linked issue
#1171
β Type of change
π Description
Replaces our custom unique id generation by nuxt's useId to bind accessibility attribute in a SSR friendly way.
π Checklist