fix #5546: remove incorrect for attribute from label in array form fi…#5552
fix #5546: remove incorrect for attribute from label in array form fi…#5552guillermo-escire wants to merge 2 commits into
Conversation
lgeggleston
left a comment
There was a problem hiding this comment.
Confirmed that this fixes the original mismatched label issue, and no regressions on the non-array form fields!
However, there is now an issue on the <label> element for array fields saying "No label associated with a form field", which makes sense when removing the for attribute for those. Since you're now associating it with the container rather than individual inputs, is it possible to keep the for attr but associate it with the container ID for arrays?
|
Hi @lgeggleston, Thank you for the review! You're right that removing the for attribute introduces the "No label associated with a form field" warning. Would you prefer we keep for pointing to the container div as a pragmatic solution, or would you like us to explore another approach such as wrapping the array, which is the semantically correct way to associate a label with a group of controls? |
|
Hi @guillermo-escire, |
References
Fixes #5546
Description
Removes the incorrect for attribute from labels associated with array-type form fields in the submission form, replacing it with aria-labelledby on the array container to maintain accessibility without triggering browser warnings.
Instructions for Reviewers
List of changes in this PR:
How to test:
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.