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

Proposal to disable animations and transitions while running a11y tests #505

Closed
tgvrssanthosh opened this issue May 25, 2023 · 3 comments
Closed

Comments

@tgvrssanthosh
Copy link
Contributor

tgvrssanthosh commented May 25, 2023

With animations and transitions in place, the a11y tests can non-deterministically fail.

For eg., lets say we have a disabled button and on certain action (click of another button) we enable the button. Lets say we have a transition property set on the button to transition the background-color of the button.

Now, lets say the disabled button contrast ratio doesn't meet the AA guidelines. The a11y tests will continue to pass since the axe-core doesn't run the tests on disabled elements. In the example that i mentioned above, when the axe-core tests run as soon as the button gets enabled, it can lead to a11y violation error since the background transition might not have completed yet.

I would like to propose to disable animations and transitions while running the a11y tests. We can add the following styles to disable transitions/animations in test-head-footer file that already contain few style overrides.

.axe-running * {
  animation: none !important;
  transition: none !important;
}

Or we can set transition and animation durations to 0 while running the a11y tests as below.

.axe-running * {
  animation-duration: none !important;
  transition-duration: none !important;
}
@drewlee
Copy link
Contributor

drewlee commented Jun 14, 2023

I'm fine with this addition since it's something we end up adding as overrides in host applications anyway. Would be good to get @MelSumner's input as well from the wider open source Ember community.

@tgvrssanthosh
Copy link
Contributor Author

@MelSumner Can you please let me know if you are fine with proposal? If so, I can create a PR for the same.

@drewlee
Copy link
Contributor

drewlee commented Jun 21, 2023

Completed via PR #511.

@drewlee drewlee closed this as completed Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants