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

chore: integrate cypress-axe for accessibility testing #11128

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nnaydenow
Copy link
Contributor

@nnaydenow nnaydenow commented Mar 18, 2025

Note: These changes are intended for use within the monorepo only

These changes are integrating the cypress-axe plugin to enable accessibility testing within the UI5 webcomponents project. As part of the integration, a new CYPRESS_UI5_ACC environment has been added to control the execution of accessibility tests. When set to true, it allows generating an accessibility report otherwise, the tests are skipped.

Additionally, a new global function, ui5AccDescribe, has been introduced for test files. This function acts as a wrapper around the standard describe function, accepting the same parameters. Internally, it determines whether to run or skip tests based on the CYPRESS_UI5_ACC value. The wrapper also injects the necessary axe-core tool and includes the ui5CheckA11y command, which is used for accessibility validation.

Note: If CYPRESS_UI5_ACC is set, only accessibility tests will run

Furthermore, the ui5CheckA11y command has been added to execute axe on mounted content.

@nnaydenow nnaydenow changed the title chore: integrate cypress-axe plugin chore: integrate cypress-axe for accessibility testing Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant