Connect & Get help from fellow developers on our Discord community.
Ask the Community
Configuration options for automated accessibility testing
Customize accessibility testing in automated tests.
Configuration options
The following table lists the keys you can use 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 the end of a test case |
scannerProcessingTimeout (add under accessibilityOptions ) |
Set a timeout for scanner processing to completely stop processing when a test case ends. | Specify the timeout value in seconds. The default is 360 . There is no maximum limit. |
Platform selection | Accessibility |
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
The following code snippets show how to add the configuration options to your test suite:
...
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
...
...
services: [
['browserstack', {
...
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
}
},
}],
],
capabilities: [{
'bstack:options': {
deviceName: 'Samsung Galaxy S22',
osVersion: "12.0",
accessibility: true, // Testing will be conducted on this device combination
}
}, {
'bstack:options': {
deviceName: 'Google Pixel 6',
osVersion: "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!