Managing Quality Gates
Accessibility Quality Gates: help ensure that your code adheres to essential accessibility standards before it is merged or deployed. These gates are highly customizable, allowing you to adjust thresholds and set your preferred actions for handling accessibility issues. You can define thresholds for specific metrics and choose whether you want to fail, warn, or ignore certain issues based on your needs.
1. Quality Goals for New Code
The New Code Quality Gate: applies to pull requests and all branches except the main branch. This ensures that any changes or additions to the code are checked for accessibility issues before they are merged into the main branch.
Customization Options
Accessibility Score Threshold: You can set your own threshold for the accessibility score. For example, if the score drops below a specific percentage (e.g., 75%), you can decide whether to trigger a warning or fail the quality gate. This allows you to determine the level of accessibility that is acceptable for your new code.
Issue Severity Thresholds: You can configure the quality gate to fail, warn, or ignore accessibility issues based on their severity:
- Critical, Serious, Moderate, Minor Issues: Set thresholds for the number of issues in each category. If any of these issues exceed your desired threshold, you can choose whether to fail the quality gate, issue a warning, or simply ignore the issue. For example, you can configure the gate to fail if there are more than 0 critical issues, warn for serious issues, or ignore minor issues.
Accepted Issues: Similarly, you can specify if any increase in the number of accepted issues (intentionally unresolved issues) should trigger an action. You can set a threshold for this increase and decide whether to fail, warn, or ignore.
2. Quality Goals for Overall Analysis
The Overall Code Quality Gate: is applied when analyzing the main branch of the project, reflecting the overall quality of the codebase.
Customization Options
Accessibility Score Threshold: Just like with new code, you can set a custom threshold for the overall accessibility score of your codebase. If the score falls below this threshold, you can decide whether to fail the quality gate, issue a warning, or ignore it based on your project’s needs.
Issue Severity Thresholds: You can also customize how critical, serious, moderate, and minor accessibility issues are handled in the overall analysis. If the number of any issues exceeds your desired threshold, you can configure whether to fail the gate, issue a warning, or ignore it.
Accepted Issues: For the overall analysis, you can monitor any increase in accepted issues and decide the action to take—fail, warn, or ignore—if the increase exceeds a specified threshold.
Conclusion
With customizable Accessibility Quality Gates, you have full control over how accessibility issues are handled within your codebase. You can adjust thresholds for accessibility scores and issue severities, and set your preferred actions—whether to fail, warn, or ignore issues—giving you the flexibility to align the gates with your project’s accessibility requirements. This ensures that your code maintains high accessibility standards while allowing for fine-tuned control over how issues are managed throughout the development process.