Skip to content
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

Fix MUI/material-ui RangeWidget missing htmlFor and schema.title #3281

Merged
merged 3 commits into from Dec 12, 2022

Conversation

kyleawayan
Copy link
Contributor

@kyleawayan kyleawayan commented Dec 3, 2022

Reasons for making this change

The RangeWidget for both the Material UI v4 and v5 themes did not have the htmlFor prop, which may cause accessibility issues.

Also I noticed that the other widgets included schema.title in the FormLabel, so I went ahead and included that also just to ensure consistency with the other widgets' FormLabels. Also I don't think the id prop is necessary either (it's not in the other FormLabels either).

I also searched both @rjsf/mui and @rjsf/material-ui to make sure there was no other FormLabel components missing the htmlFor prop. RangeWidget was the only one missing it. I also found no other components that were missing the schema.title either.

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@kyleawayan kyleawayan changed the title Fix MUI/material-ui FormLabels missing htmlFor and schema.title Fix MUI/material-ui RangeWidget missing htmlFor and schema.title Dec 3, 2022
@heath-freenome
Copy link
Member

@kyleawayan You will have to fix the snapshots using npm run test:update and add the result to this PR

@heath-freenome
Copy link
Member

Also, please update the CHANGELOG.md file with a note under the beta.14 section

@kyleawayan
Copy link
Contributor Author

@heath-freenome Updated the test snapshots and added to the changelog

@heath-freenome heath-freenome merged commit e5e80bb into rjsf-team:main Dec 12, 2022
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this pull request Jun 8, 2023
…f-team#3281)

* match FormLabel component with other widgets

* update changelog

* update test snapshots
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this pull request Jun 8, 2023
…f-team#3281)

* match FormLabel component with other widgets

* update changelog

* update test snapshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants