[#756] Made accessibility console summary opt-in via 'BEHAT_ACCESSIBILITY_PRINT'. - #757
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 37 minutes Limit details: You’ve used all 2 included reviews currently available. Your 82 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. You’re in a promotional period — use the checkbox below to run this review for free:
On-demand reviews are free for the next 30 days. After that, they cost $0.25 per reviewed file. How can I continue?Run this review now using the option above, or comment You can also wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #757 +/- ##
=======================================
Coverage 97.40% 97.40%
=======================================
Files 52 52
Lines 4552 4555 +3
=======================================
+ Hits 4434 4437 +3
Misses 118 118 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes #756
Summary
AccessibilityTraitused to unconditionallyfwrite(STDOUT, ...)a one-line per-page summary every time a page was assessed, so any consumer's console output was cluttered with[accessibility] <url>: N violations, ...lines it never asked for. Console printing is now opt-in: a new protected getter,accessibilityGetPrintCli(), guards thefwritecall, and its default implementation returns TRUE only when theBEHAT_ACCESSIBILITY_PRINTenvironment variable is set to a non-empty value other than0. Consumers can also override the getter to hardcode either behaviour. HTML, JUnit, and aggregate reports are unaffected; only the STDOUT line is gated.Changes
src/AccessibilityTrait.php: Added the protectedaccessibilityGetPrintCli()getter, wrapped the existingfwrite(STDOUT, ...)summary in a call to it, and extended the trait docblock with a new "Console output" section documenting the opt-in behaviour and theBEHAT_ACCESSIBILITY_PRINTenvironment variable.tests/behat/features/accessibility.feature: Added two Behat-in-Behat@trait:AccessibilityTraitscenarios covering the default-silent path and theBEHAT_ACCESSIBILITY_PRINT-enabled path.STEPS.md: Regenerated from the updated trait docblock so the new "Console output" section is reflected in the published documentation.Before / After