-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat: Add aria-controls to autocrud grid to control the form #1946
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1946 +/- ##
=======================================
Coverage 95.33% 95.33%
=======================================
Files 52 52
Lines 3492 3495 +3
Branches 524 526 +2
=======================================
+ Hits 3329 3332 +3
Misses 129 129
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Could we have a couple of tests validating the presence of aria-controls
and the equality of its value with the id
of the form in the two situations:
- an id is provided
- no id is passed in
The purpose is preventing future regressions.
@@ -146,6 +146,7 @@ export function AutoCrud<TModel extends AbstractModel>({ | |||
setItem(activeItem ?? undefined); | |||
}} | |||
ref={autoGridRef} | |||
aria-controls={`${id ?? 'auto'}-form`} |
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.
In case the there are more than one AutoCrud in a view, and the id
prop is undefined/null
, the AutoForm's id
and the aria-controls
of AutoGrid would clash with one another, right?
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.
Now id is generated and will be unique everytime
efa3053
to
7baf076
Compare
7baf076
to
b65a14a
Compare
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
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
This ticket/PR has been released with Hilla 24.4.0.alpha3 and is also targeting the upcoming stable 24.4.0 version. |
Add aria-controls to autocrud grid to control the form
Fixes #1666