-
-
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
[material-ui][Form Control] Native HTML attribute is not supported #38932
Comments
@mogamogua Thanks for reporting this ~ I've updated the sandbox link It could make sense to handle Are you also relying on this for styling? I think we can add |
I don't need it for styling. just wanted to make screen readers can notice disabled fieldset. |
I found that all the elements inside the disabled fieldset should be disabled. (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset). (If I set disabled to fieldset, all the input inside changed into disabled) This can be useful in case of using FormControl inside the FormControl (ex. TextField) I think fieldset element is also considered as form element in mui, so we can support valid html markup.
I'm making a design system using MUI, thank you for making a great product and I hope my opinion helps you improve the product. If there is any other way (which can affect the FormControl context used within FormControl) to solve the problems I experience creating |
@mogamogua I agree it makes sense for |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/38932-formcontrol-fieldset-33jmdg
Steps:
Current behavior 😯
No response
Expected behavior 🤔
No response
Context 🔦
I want to make
FormFieldset
component which useFormControl
component,and when disabled prop is true, also want to set fieldset's attribute disabled to true.
I don't know is it intended or not, HTML attribute is not changed.
do I alternatively use
aria-disabled
attribute?fieldset
spec: https://html.spec.whatwg.org/multipage/form-elements.html#attr-fieldset-disabledYour environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: