-
Notifications
You must be signed in to change notification settings - Fork 128
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
[SCREENREADER]: Month, Day, Year combo box pattern not announcing LEGEND to assistive devices #10142
Conversation
…ts-website into 16447-screenreader
@1Copenut I tried to test it on on my Mac but could not get it to work. I do not have a computer that has Jaws available so can you please test this and make sure it's working. I did what you recommended. |
@accbjt I think Trevor is on vacation for the next week or so, we may need to test this as best we can and leave the ticket open for him to validate when he gets back. |
@@ -87,6 +87,7 @@ export default class DateWidget extends React.Component { | |||
Month | |||
</label> | |||
<select | |||
aria-describedby={this.props.id} |
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.
The id isn't a value that would be useful for a user to hear, I don't think. I think we'd want the label, but labels might not be passed to widgets. So we might need to figure out how to pass labels to widgets or convert this to a field instead of a widget.
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.
Ideally we want the <legend>
to have a relevant ID and point to that. I'd like the select to read out its own label "Month" in this case, pause, then read out the legend text. Having that additional context for what date we're asking users to put in (service start date, service end date, birth date) is critical for screen readers, especially when we have multiple date fieldsets on the page.
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.
From my understanding the id is connected to the legend id and that is what it should read out. I think aria-describedby
is suppose to read out the element which the id is attached to. I never got this to work on Chrome so I wasn't sure if it worked the way @1Copenut wanted it to. @1Copenut were you able to try it out on JAWS?
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.
Ah yeah, looks like I misunderstood. This would actually need to be the id with -label
appended to it.
@accbjt I did some research and documented findings for different screen reader + browser pairings here: https://github.com/department-of-veterans-affairs/vets.gov-team/blob/master/Practice%20Areas/Accessibility/RESEARCH-screenreader-fieldset-legend-label.md Might be worth a quick glance to compare your findings on VoiceOver. I'll give this a look as soon as I can. Today's my first day back and I've got a few pressing items to look into. |
@accbjt Leave it for now, I will try to finish it up next week. |
@jbalboni Great, Thanks |
@1Copenut This should be ready for you to review. I verified that works as expected in VoiceOver; the legend text is read out after the specific date field label. |
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.
👍 LGTM. I tested with the big three screen readers in their native environments. All are now reading out the <legend>
text as expected. This is a significant improvement in the handling of our multi-label form groups.
Description
Original: usds/us-forms-system#265
Mentioned: https://github.com/department-of-veterans-affairs/vets.gov-team/issues/15740
Testing done
Local Testing
Screenshots
Acceptance criteria
Definition of done