Disable/enable Save button via aria-disabled attribute #6963
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 #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:
Type of change (for release notes)
notes-minor
Adding aria attribute to enable or disable Save button for assistive tech in File ManagerDetailed 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