-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[docs][autocomplete] Fix duplicate autocomplete id #42086
Conversation
Netlify deploy previewhttps://deploy-preview-42086--material-ui.netlify.app/ Bundle size report |
Why do we even need the explicit |
@michaldudak The id was needed: #18283 (comment) (a side though: seeing this reinforces the idea that we should comment as much as possible, such a nice payoff 4 years after). But since It's a bit borderline to remove in the docs: https://tools-public.mui.com/prod/pages/npmVersion?package=react-dom but I guess, why not? I have pushed a new commit. |
I understand the id is needed to wire the input to the label, but even if we use React 17 and automatically set the id only on the client, it's not really a problem. There won't be any layout shifts and I think it's safe to assume users with assistive technologies will need this in the brief moment before hydration. |
Fair enough. |
We can't have duplicated id on a page. I noticed this in #42085. Part of the value of solving these errors, the more we have, the harder its to quickly spot regressions
https://validator.w3.org/nu/?doc=https%3A%2F%2Fdeploy-preview-39603--material-ui.netlify.app%2Fmaterial-ui%2Freact-autocomplete%2F
A regression from #34066
After: https://deploy-preview-42086--material-ui.netlify.app/material-ui/react-autocomplete/