-
Notifications
You must be signed in to change notification settings - Fork 1.1k
USWDS: File Input: Remove aria disabled file input. Resolves #5144 #5146
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
Conversation
amyleadem
left a comment
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.
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
|
@amyleadem can you follow up with @amycole501 on this? |
|
Tested in JAWS; label was read accurately. Button action reads "No file selected, button unavailable." |
amyleadem
left a comment
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.
Approved!
amycole501
left a comment
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.
Sounded fine in both NVDA and JAWS
|
Work implemented in #5063 |
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