[form-schema] Make rjsf description prop available to components#382
[form-schema] Make rjsf description prop available to components#382
description prop available to components#382Conversation
wenzowski
left a comment
There was a problem hiding this comment.
Fantastic start! As far as accessibility goes, let's make sure to update the storybook so the manual axe checks can run? (not a full answer...but something that should at least be checking the font size and color of the new descriptions).
| <Sdescription htmlFor={id} {...styleProps} style={descriptionStyle} className={DESCRIPTION_CLASS}> | ||
| {description} | ||
| </Sdescription> |
There was a problem hiding this comment.
Each LABEL element is associated with exactly one form control.
This will produce two sibling labels for the same input id. Maybe we could consider wrapping the description into a <label>{title}<span>{description}</span></label> inside the existing label tag?
Alternatively, we could wrap labels around inputs, but this might be a breaking change:
<label>{title}{description}<input /></label>
There was a problem hiding this comment.
Exactly what I was thinking in the back of my head, will play around with this...
Each LABEL element is associated with exactly one
form control.
Proposed Changes
descriptionprop for use by form input components in component-libraryRelated to #359
Needs work:
[ ] HTML-only case does not yet render description labels (Storybook problem only)