Skip to content

[Cypress] Stop using checkA11y({ skipFailures: true }) and enforce strict accessibility validation#237627

Merged
alexwizp merged 13 commits intoelastic:mainfrom
alexwizp:oct-6
Oct 27, 2025
Merged

[Cypress] Stop using checkA11y({ skipFailures: true }) and enforce strict accessibility validation#237627
alexwizp merged 13 commits intoelastic:mainfrom
alexwizp:oct-6

Conversation

@alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Oct 6, 2025

Summary

  • Remove use of checkA11y({ skipFailures: true }) across Cypress tests and enforce strict accessibility validation so that accessibility violations cause test failures.
  • This change ensures accessibility regressions are caught by CI rather than silently skipped.

Why

  • Using skipFailures: true masked accessibility problems and allowed regressions to slip into main branch.
  • Enforcing strict accessibility checks improves product quality and aligns tests with accessibility-first goals.

What was changed

  • Replaced occurrences of checkA11y({ skipFailures: true }) (and equivalent patterns) so that accessibility checks run without the skipFailures flag.
  • Fixed or adjusted places where necessary to make test suites pass with strict a11y checks (small target adjustments to code to fix violations)

Depends on

@alexwizp alexwizp added backport:skip This PR does not require backporting backport:version Backport to applied version labels v9.3.0 v9.2.1 Project:Accessibility and removed backport:skip This PR does not require backporting labels Oct 24, 2025
@elastic elastic deleted a comment from elasticmachine Oct 24, 2025
@alexwizp alexwizp marked this pull request as ready for review October 24, 2025 16:09
@alexwizp alexwizp requested a review from a team October 24, 2025 16:09
@alexwizp alexwizp requested a review from a team as a code owner October 24, 2025 16:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@botelastic botelastic bot added Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. labels Oct 24, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@alexwizp alexwizp added the release_note:skip Skip the PR/issue when compiling release notes label Oct 24, 2025
Copy link
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

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

Thank you for enabling the a11y tests in APM. The code change LGTM?

We already moved some tests to playwright/scout here, and we plan to do that with the rest of the Cypress tests.

@dmlemeshko do we have a similar method to checkA11y in scout, and what do you recommend using there? I see that playwright is also using axe for a11y testing, so maybe we can have something similar?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.8MB 2.8MB +765.0B
unifiedDocViewer 273.3KB 273.5KB +156.0B
total +921.0B

History

@alexwizp
Copy link
Contributor Author

@dmlemeshko do we have a similar method to checkA11y in scout, and what do you recommend using there? I see that playwright is also using axe for a11y testing, so maybe we can have something similar?

@jennypavlova As a first step in the a11y project, we want to un-skip the broken tests for Cypress and FTR. After that, we'll likely add similar coverage for Scout as well. However, for now, Scout’s coverage is too low, and we need to continue supporting the previously implemented mechanisms

@dmlemeshko
Copy link
Contributor

Thank you for enabling the a11y tests in APM. The code change LGTM?

We already moved some tests to playwright/scout here, and we plan to do that with the rest of the Cypress tests.

@dmlemeshko do we have a similar method to checkA11y in scout, and what do you recommend using there? I see that playwright is also using axe for a11y testing, so maybe we can have something similar?

@jennypavlova we don't have any wrapper for a11y in Scout yet, but we definitely plan to use Playwright in-built accessibility testing functionality. I can have a look and add it asap

@alexwizp alexwizp merged commit 00b3e4a into elastic:main Oct 27, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.2

https://github.com/elastic/kibana/actions/runs/18838635990

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 27, 2025
…strict accessibility validation (elastic#237627)

## Summary

- Remove use of `checkA11y({ skipFailures: true })` across `Cypress`
tests and enforce strict accessibility validation so that accessibility
violations cause test failures.
- This change ensures accessibility regressions are caught by CI rather
than silently skipped.

## Why
- Using `skipFailures: true` masked accessibility problems and allowed
regressions to slip into main branch.
- Enforcing strict accessibility checks improves product quality and
aligns tests with accessibility-first goals.

## What was changed
- Replaced occurrences of `checkA11y({ skipFailures: true })` (and
equivalent patterns) so that accessibility checks run without the
`skipFailures` flag.
- Fixed or adjusted places where necessary to make test suites pass with
strict a11y checks (small target adjustments to code to fix violations)

## Depends on
- elastic/eui#9100

(cherry picked from commit 00b3e4a)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@alexwizp alexwizp removed the v9.2.1 label Oct 27, 2025
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Oct 28, 2025
@alexwizp alexwizp added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 29, 2025
@elastic elastic deleted a comment from kibanamachine Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting backport:version Backport to applied version labels Project:Accessibility release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants