chore: integrate cypress-axe
for accessibility testing
#11128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 newCYPRESS_UI5_ACC
environment has been added to control the execution of accessibility tests. When set totrue
, 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 standarddescribe
function, accepting the same parameters. Internally, it determines whether to run or skip tests based on theCYPRESS_UI5_ACC
value. The wrapper also injects the necessaryaxe-core
tool and includes theui5CheckA11y
command, which is used for accessibility validation.Note: If
CYPRESS_UI5_ACC
is set, only accessibility tests will runFurthermore, the
ui5CheckA11y
command has been added to executeaxe
on mounted content.