-
Notifications
You must be signed in to change notification settings - Fork 37
Add aria-expanded to Transit Leg Summary #903
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
base: master
Are you sure you want to change the base?
Add aria-expanded to Transit Leg Summary #903
Conversation
|
@miles-grant-ibigroup This is ready for review! |
|
Have you run |
|
@miles-grant-ibigroup Ran All set now |
miles-grant-ibigroup
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.
Changes look great
amy-corson-ibigroup
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.
Hello! Thank you for the PR and I want to apologize in advance, I think this fix is actually a little more complicated!
Technically we currently announce this button to screenreaders as Ride 3 min / 2 stops (Expand details). I agree with you that aria-expanded is a more appropriate way to handle this (I really hope I'm not forgetting something about why we did it this way!) However if we make this change, it will require the following:
- This change should be applied to
AccessLegBody,TransitLegSummmary, andTransitLegBodyso the accessibility approach is consistent throughout the itinerary. - The
InvisibleAdditionalDetailscomponent with "(Expand details)" in each of these components should be removed and theotpUi.TransitLegBody.expandDetailsstring should also be removed from the internationalization files. - Per the
aria-expandeddocs, the button in each case will also need anaria-controlsproperty with the id of the collapsed/expanded container.
Let me know if I can clarify any of these points! Thank you again.
Using https://www.opentripplanner.org/otp-ui/?path=/story/itinerarybody-otp-ui--walk-transit-walk-itinerary-with-agency-information&globals=locale:en-US
if we use a screenreader right now the
Ride 3 min / 2 stopsdoesn't announce expanded for screenreader users.by adding an aria-expanded to the TransitLegSummary I'm now able to hear expanded and collapsed for this line