react-jsonschema-form
react-jsonschema-form copied to clipboard
Add predictable ID for help fields, aria describedby attributes
Reasons for making this change
Make screen reader read field errors, description and help text.
Fixes #959
Checklist
- [ ] I'm updating documentation
- [ ] I've checked the rendering of the Markdown text I've added
- [x] I'm adding or updating code
- [x] I've added and/or updated tests
- [ ] I've updated docs if needed
- [ ] I'm adding a new feature
- [ ] I've updated the playground with an example use of the feature
Deploy preview
Once CI finishes, you should be able to view a deploy preview of the playground from this PR at this link: https://deploy-preview-[PR_NUMBER]--rjsf.netlify.app/
Thanks for the PR. I wonder if we can update the changes here with the latest changes just added in https://github.com/rjsf-team/react-jsonschema-form/pull/2360. Specifically, can you make sure that all the help / description / title field ids are using the id utility functions you defined in utils.js? Specifically, we might need to change packages/semantic-ui/src/FieldTemplate/FieldTemplate.js
, for example.
Can we also add snapshot tests as needed for the affected themes, because now the help fields have different ids?
Thank you for the suggestions. I searched for other mentions of __description
, __help
and __errors
. packages/semantic-ui/src/FieldTemplate/FieldTemplate.js
was the only one not using the utility function. it's now fixed.
I updated the affected snapshots and added more material-ui updates.
Hi @ArnoSaine it's been a while, do you remember where we are with this PR? Is this ready except for making it a breaking change / adding it to a v5.x upgrade guide?
Reimplemented in #3380