USWDS: File Input: Remove aria disabled file input. Resolves #5144#5146
Closed
mahoneycm wants to merge 2 commits into
Closed
USWDS: File Input: Remove aria disabled file input. Resolves #5144#5146mahoneycm wants to merge 2 commits into
mahoneycm wants to merge 2 commits into
Conversation
amyleadem
reviewed
Feb 13, 2023
amyleadem
left a comment
Contributor
There was a problem hiding this comment.
This looks good to me!
I confirmed the following items:
- The
aria-disabledattribute is no longer added to theusa-file-inputparent element - There was no negative impact on the VoiceOver readout. It still reads the label and stated that the input was dimmed. (This is unchanged from the experience in VO for
develop)
@amycole501 I am going to add you to the review so you can confirm that the JAWS readout follows best practices. I will hold off on approval until I hear your findings.
…disabled-file-input
mejiaj
approved these changes
Mar 20, 2023
Contributor
|
@amyleadem can you follow up with @amycole501 on this? |
|
Tested in JAWS; label was read accurately. Button action reads "No file selected, button unavailable." |
amycole501
approved these changes
Mar 28, 2023
amycole501
left a comment
There was a problem hiding this comment.
Sounded fine in both NVDA and JAWS
20 tasks
Contributor
Author
|
Work implemented in #5063 |
This file contains hidden or 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
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.
Summary
Remove
aria-disabledattribute fromusa-file-inputelement to allow screen readers to read out label tag.Breaking change
This is not a breaking change
Related issue
Closes #5144
Preview link
File Input (Disabled) →
Problem statement
Currently, when File Input is initialized, the
aria-disabledattribute is added to the parent element. This causes the label to no longer be read by screen readers, which goes against best practices for screen readers.Solution
Remove JS which sets this attribute. Now the File Input is still read as disabled, but the label is also ready by screenreaders
Testing and review