Skip to content
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

Evaluate automated testing for color contrast / deficiencies #4021

Closed
swissspidy opened this issue Aug 17, 2020 · 4 comments
Closed

Evaluate automated testing for color contrast / deficiencies #4021

swissspidy opened this issue Aug 17, 2020 · 4 comments
Assignees
Labels
Accessibility Changes that impact accessibility and need corresponding review (e.g. markup changes). P3 Nice to have Type: Infrastructure Changes impacting testing infrastructure or build tooling Type: Task Tasks which do not involve engineering

Comments

@swissspidy
Copy link
Collaborator

Task Description

Ensuring high color contrast (WCAG AA) was previously mentioned as a requirement.

How can we do this in an automated fashion?

@swissspidy swissspidy added Accessibility Changes that impact accessibility and need corresponding review (e.g. markup changes). Type: Task Tasks which do not involve engineering Pod: WP & Infra Type: Infrastructure Changes impacting testing infrastructure or build tooling labels Aug 17, 2020
@swissspidy swissspidy added the P3 Nice to have label Sep 23, 2020
@barklund
Copy link
Contributor

barklund commented Oct 1, 2020

Given that we already have @storybook/addon-a11y added to our storybook setup, which among other things test for contrast, could we perhaps use this in some way? Can you run Storybook headless-ly for just the tests?

@swissspidy
Copy link
Collaborator Author

I think so. There‘s https://www.npmjs.com/package/@storybook/addon-storyshots-puppeteer that allows running aXe against storybook stories

Also interesting: https://docs.percy.io/docs/storybook. I think Marcin experimented with that in #4145

@swissspidy
Copy link
Collaborator Author

Interestingly aXe support there was added specifically because of Gutenberg, but Gutenberg has since stopped using it:

WordPress/gutenberg#21485
WordPress/gutenberg#21626

Perhaps easier to just use #4778 for this?

@storybook/addon-a11y is based on aXe too anyway

Not sure how to test for things like color blindness though. Maybe we just do that manually for now?

@swissspidy swissspidy self-assigned this Oct 5, 2020
@swissspidy swissspidy added this to the Sprint 38 milestone Oct 5, 2020
@bmattb bmattb modified the milestones: Sprint 38, Sprint 39 Oct 5, 2020
@swissspidy
Copy link
Collaborator Author

I think it's easier to do this in the karma tests instead of adding yet another test suite that just uses aXe under the hood anyway.

I'll try to cover this in #4020.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Changes that impact accessibility and need corresponding review (e.g. markup changes). P3 Nice to have Type: Infrastructure Changes impacting testing infrastructure or build tooling Type: Task Tasks which do not involve engineering
Projects
None yet
Development

No branches or pull requests

3 participants