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

Implement color contrast accessibility test #22

Closed
vincerubinetti opened this issue Oct 3, 2024 · 5 comments · Fixed by #31
Closed

Implement color contrast accessibility test #22

vincerubinetti opened this issue Oct 3, 2024 · 5 comments · Fixed by #31
Assignees
Labels
frontend Frontend-related

Comments

@vincerubinetti
Copy link
Collaborator

accessibility.spec.ts currently has the following:

/** NOT WORKING YET https://github.com/StackExchange/apca-check/issues/143 */
registerAPCACheck("bronze");

// ...

      const { violations } = await new AxeBuilder({ page })
        /** https://github.com/dequelabs/axe-core/issues/3325 */
        .options({ rules: { "color-contrast": { enabled: false } } })
        .analyze();

See the two github issues linked there for full details. In summary:

We have disabled the standard "color-contrast" accessibility test, because it is frankly not very accurate or good. I want to replace it with the newer and better advanced perceptual contrast algorithm, but I'm having trouble integrating that StackExchange/apca-check library with Playwright.

This seems to be challenging to fix; see the first issue for problems I've encountered and what I've tried.

@vincerubinetti vincerubinetti added frontend Frontend-related outreachy labels Oct 3, 2024
@vincerubinetti
Copy link
Collaborator Author

To ensure the test is actually running and catching errors, you could for example change the light-mode --black theme variable to #ffffff, which would definitely be a contrast violation:

Screenshot 2024-10-03 at 12 52 10 PM

@valentina-buoro
Copy link

hi @vincerubinetti can I work on this?

@vincerubinetti
Copy link
Collaborator Author

@valentina-buoro Please abandon work on this. I've deemed this infeasible/impossible. See the discussion here:

StackExchange/apca-check#143

@vincerubinetti vincerubinetti closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
@valentina-buoro
Copy link

okay @vincerubinetti . Lighthouse seems like a good tool to test accessibility. Although doing it manually might be tedious.

@vincerubinetti
Copy link
Collaborator Author

vincerubinetti commented Oct 15, 2024

Regarding Lighthouse testing, see this issue I created: #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Frontend-related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants