-
Notifications
You must be signed in to change notification settings - Fork 69
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: rely on Form.Control and controlId in Form.Group #2931
fix: rely on Form.Control and controlId in Form.Group #2931
Conversation
✅ Deploy Preview for paragon-openedx ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@adamstankiewicz now that #2951 has been merged this should pass tests after a rebase. |
5bd9772
to
082845e
Compare
@brian-smith-tcril Thanks for the ping! I've rebased with Edit: failed again. Will take a look in a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Looks like the only issues here are a couple tiny linter errors around imports. Once those are resolved
082845e
to
28926b9
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2931 +/- ##
=======================================
Coverage 93.00% 93.00%
=======================================
Files 236 236
Lines 4273 4273
Branches 1033 1033
=======================================
Hits 3974 3974
Misses 295 295
Partials 4 4 ☔ View full report in Codecov by Sentry. |
🎉 This PR is included in version 21.13.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Resolves https://2u-internal.atlassian.net/browse/TNL-11258.
There was a bug where the
FormLabel
inDataTable
'sTextFilter
was including afor
attribute pointing to an ID that does not exist in the DOM (throws an a11y error).By instead passing
ariaLabel.current
to<Form.Group>
as itscontrolId
prop, we can ensure that all form component within theForm.Group
rely on a consistent ID. However, previously, we were using the deprecatedInput
instead ofForm.Control
, so the appropriateid
was not automatically applied to the input field in the DOM.Resolution:
controlId
toForm.Group
FormLabel
withForm.Label
.Input
withForm.Control
.In the following image, not that the
<label>
'sfor
attribute now refers to the input with the appropriate, identicalid
:Deploy Preview
https://deploy-preview-2931--paragon-openedx.netlify.app/components/datatable/#frontend-filtering-and-sorting
Merge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist