Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Accessibility: Enable accessibilityAudit on different pages in our integration tests #33093

Closed
umpox opened this issue Mar 25, 2022 · 3 comments · Fixed by #33332, #33578, #33824, #33826 or #33861
Closed
Assignees
Labels
accessibility a11y / accessibility gitstart Contract partner wcag/2.1/fixing wcag/2.1

Comments

@umpox
Copy link
Contributor

umpox commented Mar 25, 2022

Problem statement

We recently added accessibilityAudit to our integration tests (https://github.com/sourcegraph/sourcegraph/pull/32895). It will test the current page for accessibility and fail with any errors.

We should aim to use this in all areas where we use percySnapshot

Success criteria

We have enabled accessibilityAudit in all the areas where we use percySnapshot in the integration tests.

Implementation details

Here's how we should implement:

  1. Add accessibilityAudit in the same place where we call percySnapshot in the integration tests.
  2. Run the tests locally and observe any failures. See the above PR for example output.

To fix the failures, we should:

a. If it's simple or quick to fix, then make the changes on the branch. There should be relevant documentation attached to the test error that will help you work out how to fix this.
b. If it's complex, or will take a long time to fix. Add the a11y-ignore class to exclude the element from the audit, raise an issue specifically to solve this problem, leave a comment next to the class with a link to the issue.

Useful links:
accessibilityAudit
Accessibility documentation to help debug

Time estimate

We should not spend more than 4 hours per addition of accessibilityAudit. If we find ourselves taking more than that, we should create a separate issue for the complex problems.

@gitstart-app
Copy link
Contributor

gitstart-app bot commented Mar 25, 2022

Here is the GitStart Ticket for this issue: https://app.gitstart.com/clients/sourcegraph/tickets/SG-33093

@gitstart-sourcegraph
Copy link
Collaborator

gitstart-sourcegraph commented Apr 5, 2022

@umpox We have some instances of monaco-editor breaking accessibility with landmark-unique rule, due to there being two .monaco-status divs with role=complementary but no aria-label. Here's an existing issue that highlights this, I believe this issue should be resolved in later versions of monaco-editor than we have at the moment (v0.24.0). WDYT about spending some time to upgrade monaco-editor to version to resolve this, or an alternative solution perhaps?. Considering it's a dynamically generated element, disabling accessibilityAudit might be tricky.

@umpox
Copy link
Contributor Author

umpox commented Apr 5, 2022

@gitstart-sourcegraph It appears actually that bug has not been fixed, so we'll have to add an additional workaround here.

Let's update this line to take an array of ignored classes, so we can still ignore even if it is dynamically added.

    const axe = new AxePuppeteer(page).exclude([
        ACCESSIBILITY_AUDIT_IGNORE_CLASS,
        '.monaco-status', // https://github.com/microsoft/monaco-editor/issues/2448
    ])

@gitstart-sourcegraph gitstart-sourcegraph moved this from Done to In Progress in WCAG 2.1 AA Accessibility Apr 14, 2022
Repository owner moved this from In Progress to Done in WCAG 2.1 AA Accessibility Apr 20, 2022
@gitstart-sourcegraph gitstart-sourcegraph moved this from Done to In Progress in WCAG 2.1 AA Accessibility Apr 21, 2022
Repository owner moved this from In Progress to Done in WCAG 2.1 AA Accessibility Apr 21, 2022
@gitstart-sourcegraph gitstart-sourcegraph moved this from Done to In Progress in WCAG 2.1 AA Accessibility Apr 21, 2022
Repository owner moved this from In Progress to Done in WCAG 2.1 AA Accessibility Apr 22, 2022
@gitstart-sourcegraph gitstart-sourcegraph moved this from Done to In Progress in WCAG 2.1 AA Accessibility Apr 23, 2022
Repository owner moved this from In Progress to Done in WCAG 2.1 AA Accessibility Apr 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility a11y / accessibility gitstart Contract partner wcag/2.1/fixing wcag/2.1
Projects
No open projects
Status: Done
2 participants