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

Disable/enable Save button via aria-disabled attribute #6963

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

jlhardes
Copy link
Contributor

@jlhardes jlhardes commented Nov 5, 2024

Fixes

Fixes #6814

Summary

Present tense short summary (50 characters or less)
Disables/enables aria-disabled attribute on Save button in File manager

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • In File Manager, inspect Save button and see aria-disabled="true" and Save button does no action when clicked
  • Change file order or radio button selection, inspect Save button and see aria-disabled="false"
  • Change back to original order or radio button settings, inspect Save button and see aria-disabled="true" and Save button does no action when clicked
  • Change file order or radio button selection, inspect Save button and see aria-disabled="false" and Save button saves changes

Type of change (for release notes)

  • notes-minor Adding aria attribute to enable or disable Save button for assistive tech in File Manager

Detailed Description

Fixing an accessibility issue with the Save button in File Manager. When there are no File Manager changes to save, clicking the button doesn't do anything but assistive tech still registers the Save button as an active button (there is no aria attribute on the button at all). The button is styled as being disabled and thus comes across to assistive tech as not having enough color contrast (because it is still an active button). SiteImprove is flagging the lack of color contrast on this button as an issue.

Adding aria-disabled as an attribute on the button allows assistive tech to disregard the button unless it is not disabled (aka aria-disabled="false"). This allows the Save button to be "greyed out" and functionally disabled for clicking and assistive tech (aria-disabled="true" by default) and then if a change is made in File Manager, the button is then activated via darkened/more contrasting style and enabled for clicking and assistive tech to register (aria-disabled="false").

These changes also correct the SiteImprove error reporting for color contrast not meeting minimum requirement because aria-disabled="true" when the Save button is disabled and it is disregarded for color contrast review.

@samvera/hyrax-code-reviewers

Copy link

github-actions bot commented Nov 5, 2024

Test Results

    17 files  ±0      17 suites  ±0   2h 16m 39s ⏱️ +46s
 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 8ebf706. ± Comparison against base commit c56c4a8.

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:0x00007f8c5c9c2580>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fccd08321c0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f8c66262a88>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fccd0c962c0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: ac5954f2-73c7-43ba-a7cb-ba258dd9ce2f
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 3f8590fe-defd-45ab-8503-3fb4d9cd2a58
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: b9ff3af0-856f-46b3-b0f2-fcd06ed9672f
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 1695e35c-ea8e-4f96-bc21-8295acf9cd3d
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 1e355e41-0aa0-4fb1-95e6-b31618146bff
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 01455be7-5abb-47b6-ada6-0820e00027b0
…
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f542b3c9d90>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fe98ec3a508>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f542b3bcfa0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fe98c4dfc88>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: a9852604-7083-4765-a5ed-7e9d3d68df50
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 449ca900-5066-4af3-9734-d5fa4f28dc40
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: da24197c-e704-4e95-aaca-3148f0df574a
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 48824af9-90c4-4eff-957d-f9552e856979
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 24e23126-0504-4a44-8cf4-a6b1ddc70c80
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 034cdd8e-bcfa-4dfb-baa2-8e62aa31bd95
…

@randalldfloyd randalldfloyd merged commit 153d573 into main Nov 6, 2024
22 checks passed
@randalldfloyd randalldfloyd deleted the issue-6814 branch November 6, 2024 16:46
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.

Save button on file manager page has insufficient color contrast
2 participants