Skip to content

Conversation

@miles-grant-ibigroup
Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup commented Aug 5, 2021

In tandem with opentripplanner/otp-ui#283 makes colors within OTP-RR conform with WCAG.

A few notes:

refactor: a11y improvements discovered by axe

Revert "test: update build to ensure test accuracy"

This reverts commit e59581e.

refactor: a11y improvements
@miles-grant-ibigroup miles-grant-ibigroup removed the WIP Work in progress label Aug 5, 2021
@miles-grant-ibigroup miles-grant-ibigroup marked this pull request as ready for review August 5, 2021 19:05
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose there is more to uncover as we go but this looks like a good start.

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a FIXME for placing the correct language code when doing i18n. (I will also add it to the active i18n branch too.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Added in 994a5fd

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be interested to see how this applies to a website that can change languages, but I guess it's good enough to have the fixme there. Maybe just add a note that the lang attribute is there to make a11y happy.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I have added the code to update the lang attribute in 0179759 in the #408 branch.

color: '#028602',
label: 'on time'
},
SCHEDULED: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What color are we using for scheduled departures? We may need to check that we are using the same as in https://github.com/ibi-group/otp-ui/pull/8/files for consistency.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can gather, it's inherited from otp-ui? Or am I misunderstanding what's going on here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The color is #bbb and defined underneath and gets merged in the CSS by the Container component. Not a critical item, and I don't think the Lighthouse devtools plugin can catch that as is as these labels are not part of the initial render of stop viewers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If withBackground is false, isn't it inherited? Otherwise yes I agree. May have to do this on a project by project basis. For what it's worth, Firefox dev tools can do color contrast checking even on subsequent renders!

@miles-grant-ibigroup
Copy link
Collaborator Author

Thank you for the feedback! All is resolved aside from a small question about the scheduled colors. From what I can tell based on looking at the inspector, if no color is set the color is inherited from the otp-ui css.

@binh-dam-ibigroup
Copy link
Collaborator

Thank you for the feedback! All is resolved aside from a small question about the scheduled colors. From what I can tell based on looking at the inspector, if no color is set the color is inherited from the otp-ui css.

Should be ok for now, so you can pass it to the next reviewer.

@miles-grant-ibigroup
Copy link
Collaborator Author

Assigning this back to myself after today's discussion, will add the puppeteer fixes first.

console.log('Built OTP-RR')

// Launch mock OTP server
const MOCK_SERVER_PORT = 9999
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This port won't work with the ports allowed with our localhost Mapbox token.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaflet fails a11y tests and can't really be fixed from within this repo (the copyright at the bottom) so it should be alright?

Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs an update so secrets and live endpoints are obtained from environment variables and not from plain-text files.

@miles-grant-ibigroup
Copy link
Collaborator Author

Have addressed these pressing items. Sorry again about writing that config to this repository.

Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just needs those updated otp-ui versions.

@landonreed
Copy link
Member

Assigned to @miles-grant-ibigroup for integrating new otp-ui releases.

@landonreed landonreed merged commit ade744e into dev Aug 17, 2021
@landonreed landonreed deleted the fix-a11y-issues branch August 17, 2021 21:21
@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants