-
Notifications
You must be signed in to change notification settings - Fork 124
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
Issue 6802 v2 #6955
Merged
Merged
Issue 6802 v2 #6955
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test Results 17 files ±0 17 suites ±0 2h 17m 44s ⏱️ -1s Results for commit 968f7f7. ± Comparison against base commit 5973742. This pull request removes 266 and adds 266 tests. Note that renamed tests count towards both.
|
randalldfloyd
approved these changes
Nov 1, 2024
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.
Super! Thanks for adding that extra commit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
Fixes #6802
Fixes #6816
Summary
The situation stems from multiple inputs needing to be associated with one label elt. The current setup is compliant until a second input is automatically generated when the first one has a value.
Guidance for testing, such as acceptance criteria or new user interface behaviors:
*Bring up the edit page for a user collection (#6802), and run an accessibility checker. The second title input box should not be flagged for A 4.1.2, Form field missing a label.
*Same instructions for editing a work(#6816): the second title input box should not be flagged for A 4.1.2.
*
Type of change (for release notes)
notes-minor
Detailed Description
As it stands, the title label element has no ID, uses for="collection_title" to associate with the initial title input.
When a second title input is automatically added, the label's "for" property would no longer be of use. Instead, both inputs use aria-labelledby="collection_title_label" but the label elt does not have that ID.
The proposed fix adds javascript to add the appropriate ID to the label elt.
This fix was originally published here: OregonDigital/OD2@f32e7e8
Adapted to cover elements in the form that are not of type input (eg text-area)
If no element is found, the id is not assigned; this is to avoid adding an id "undefined_label" to the location label. The location partial has its own method of dealing with associating the label.
Changes proposed in this pull request:
@samvera/hyrax-code-reviewers