Configuration options in Automated tests
Customize Accessibility testing in your Automated tests.
Add the keys mentioned in the following table to configure Accessibility testing:
Use-case | Key | Description | Values |
---|---|---|---|
Specify WCAG version |
wcagVersion (add under accessibilityOptions ) |
Specify the WCAG ruleset that is targeted during automatic issue detection. |
wcag22aaa , wcag22aa , wcag22a , wcag21aaa , wcag21aa , OR wcag21a .Default is wcag21aa . |
Include or exclude best practice issues |
bestPractice (add under accessibilityOptions ) |
Issues marked as best practices aren’t Accessibility guideline violations, but resolving them will improve the overall user experience. |
true OR false .Default is true . |
Scanner processing timeout at end of test case |
scannerProcessingTimeout (add under accessibilityOptions ) |
Set a timeout for scanner processing to completely stop processing when a test case ends. |
0 to 30 seconds.Default is 10 seconds. |
Platform selection | accessiblity |
Enables accessibility testing only on specific device and OS combinations. Add the accessibility flag at the device level in the platforms section for TestNG and under capabilities section for WDIO. |
true OR false .This is a optional flag that overrides the accessibility flag set at the root level. |
Include test cases | includeTagsInTestingScope |
Test cases with these tags, annotations or groups will be included in the accessibility testing scope. Learn to include specific test cases in accessibility testing scope. | List of test case tags |
Exclude test cases | excludeTagsInTestingScope |
Test cases with these tags, annotations or groups will be excluded from the accessibility testing scope. Learn to exclude specific test cases in accessibility testing scope. | List of test case tags |
Example
Click on TestNG or Webdriver IO to view a snippet of the test configuration file defining the configuration options.
...
accessibility: true
accessibilityOptions:
wcagVersion: wcag21aaa # Default: wcag21aa
scannerProcessingTimeout: 20 # Default: 10
includeTagsInTestingScope: ["accessibility", "workflow"] # Tags to include test cases
excludeTagsInTestingScope: ["old"] # Tags to exclude test cases
includeIssueType:
bestPractice: true # Default: true
platforms:
- platformName: android
deviceName: Samsung Galaxy S22
platformVersion: 12.0
accessibility: true # Testing will be conducted on this device combination
- platformName: android
deviceName: Google Pixel 6
platformVersion: 13.0
accessibility: false # Testing will not be conducted on this device combination
...
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!