fix(carbon-react): removes default props for accessible placeholders#9741
Conversation
|
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: c693db4 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/617c76a2d401d300089ea623 😎 Browse the preview: https://deploy-preview-9741--carbon-react-next.netlify.app |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: c693db4 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/617c76a2aef7070007bb6429 😎 Browse the preview: https://deploy-preview-9741--carbon-elements.netlify.app |
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: c693db4 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/617c76a2a8fd5700077588e3 😎 Browse the preview: https://deploy-preview-9741--carbon-components-react.netlify.app |
joshblack
left a comment
There was a problem hiding this comment.
I think for the default props we'll want the value to be undefined versus an empty string.
For dropping isRequired, is it the case that all of these are no longer required? It seemed like we would still want them but want the user to provide them versus the default props being used. Let me know if I'm misunderstanding 👀
Co-authored-by: Josh Black <josh@josh.black>
Co-authored-by: Josh Black <josh@josh.black>
I think you might have it backwards! If v11 is enabled, they are required, if not, they aren't |
| id: FeatureFlags.enabled('enable-v11-release') | ||
| ? PropTypes.string.isRequired | ||
| : PropTypes.string, |
There was a problem hiding this comment.
Do we auto-generate the id for the component if it doesn't exist already?
Co-authored-by: Josh Black <josh@josh.black>
Co-authored-by: Josh Black <josh@josh.black>
Co-authored-by: Josh Black <josh@josh.black>
Closes #9466
(Once #9731 is merged)
Removes default props in v11 for accessible placeholder's and ensures that the props are required.
Also makes
Tab'sidprop required since the component has an accessibilty violation if it's not provided (reference #9666)Changelog
Changed
FileUploaderis now required and default is emptyNumberInputare now emptylabelandidare requiredTesting / Reviewing
Verify that everything works as expected