react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Add predictable ID for help fields, aria describedby attributes

Open ArnoSaine opened this issue 3 years ago • 3 comments

Reasons for making this change

Make screen reader read field errors, description and help text.

Fixes #959

Checklist

  • [ ] I'm updating documentation
  • [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/

ArnoSaine avatar May 19 '21 19:05 ArnoSaine

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?

epicfaace avatar May 19 '21 22:05 epicfaace

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.

ArnoSaine avatar May 21 '21 00:05 ArnoSaine

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?

epicfaace avatar May 12 '22 00:05 epicfaace

Reimplemented in #3380

heath-freenome avatar Jan 15 '23 03:01 heath-freenome