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

[fields] Handle focusing container with inputRef.current.focus on accessibleFieldDOMStructure #15985

Merged
merged 5 commits into from
Dec 30, 2024

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Dec 23, 2024

I noticed this when looking into #15967.

The controlled section selection demo no longer works after the components were changed to an accessible DOM structure.

I choose to pursue an approach where users would not see a breaking change.
Previous usages of inputRef?.current.focus() would continue working on v8. 👍

If you think that this is not worth it, then we have a breaking change and potentially need to make unstableFieldRef stable and recommend refactoring to fieldRef?.current.focusField().

@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature feature: Keyboard editing Related to the pickers keyboard edition labels Dec 23, 2024
@LukasTy LukasTy self-assigned this Dec 23, 2024
@mui-bot
Copy link

mui-bot commented Dec 23, 2024

Deploy preview: https://deploy-preview-15985--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 330ff1a

Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small test would be great 🙏

@LukasTy
Copy link
Member Author

LukasTy commented Dec 30, 2024

A small test would be great 🙏

Thanks, that's a great suggestion. 👍
I've added one on the DateField tests. 😉

@LukasTy LukasTy enabled auto-merge (squash) December 30, 2024 14:07
@LukasTy LukasTy merged commit 9bce04c into mui:master Dec 30, 2024
16 checks passed
@LukasTy LukasTy deleted the field-ref-usage branch December 30, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature feature: Keyboard editing Related to the pickers keyboard edition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants