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

Issue 6802 v2 #6955

Merged
merged 2 commits into from
Nov 1, 2024
Merged

Issue 6802 v2 #6955

merged 2 commits into from
Nov 1, 2024

Conversation

lsat12357
Copy link
Contributor

@lsat12357 lsat12357 commented Nov 1, 2024

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.

<label class="control-label multi_value required" for="collection_title">Title <span class="badge badge-info required-tag">required</span></label>

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:

  • Adding the field_manager js from HydraEditor and then overriding it.

@samvera/hyrax-code-reviewers

Copy link

github-actions bot commented Nov 1, 2024

Test Results

    17 files  ±0      17 suites  ±0   2h 17m 44s ⏱️ -1s
 6 729 tests ±0   6 432 ✅ ±0  297 💤 ±0  0 ❌ ±0 
13 229 runs  ±0  12 833 ✅ ±0  396 💤 ±0  0 ❌ ±0 

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.
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f7b1fd80008>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fbf0b89b2d8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f7b1fd8f508>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fbef7fc44d8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 5bddec03-9520-4026-9f59-9b2cdf2db3f3
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 78b178c6-3969-4c19-a770-d91ede0b2365
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 0ed322cc-eba9-437c-83a0-9c2ab5260896
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 5641845b-0085-46b3-8cd5-b4dd6a74a051
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: ec785e75-94b3-4855-a647-5352ef4b4350
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 620247fe-afb9-4ff2-bf6a-409da12edc4a
…
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f0a039bd700>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f36c86f21c8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f0a0353fb60>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f36b19a26c8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 114b3671-145e-456c-8551-f4acf6f24b23
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: d1d181dc-0948-4532-89ff-cb3d8e8efa4c
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 1d33f11a-858f-4a24-b504-62eab22c06aa
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 1171d9db-5531-4b10-b529-218cc1f7f279
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: c225855b-a17e-4510-8ac4-78df78583779
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: fb57f7b3-9da1-4f92-b1f6-c12984cfb268
…

Copy link
Contributor

@randalldfloyd randalldfloyd left a 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.

@randalldfloyd randalldfloyd merged commit 4365885 into main Nov 1, 2024
22 checks passed
@randalldfloyd randalldfloyd deleted the issue-6802_v2 branch November 1, 2024 20:41
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.

edit work page form fields missing description form field missing a label on collection edit page
2 participants