fix(marketing): pricing — honest ROI payback + capped sliders + URL hygiene
- ROI payback now returns raw months; template branches to 'moins d'un mois'
for sub-month paybacks and 'Payable dès la première année' when savings≤0
(was rounding up to 'Payback : 1 mois' for ~95% of slider combos)
- Cap sliders: users 1..25 (was 50), hours 0.5..4 (was 8) to keep displayed
savings in a defensible band (~8.8 M$/yr max instead of 35 M$)
- pricing_card href uses cta_url.rstrip('/') to avoid double-slash if caller
passes a trailing slash (preempts A-2.8 / B-2.7 regression)
- aria-live polite + aria-atomic on the savings paragraph so screen readers
announce slider updates
- Cleaner JS module pattern: single window.roiCalculator = function() {...}
- Tests updated for payback ternary; new tests for slider caps, aria-live,
and double-slash guard
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// - 80% du temps de transcription manuelle est économisé
|
||||
// - 220 jours ouvrables/an
|
||||
// - Coût annuel comparé = DictIA 16 = 5 750 $ + (201 $ × 12) = 8 162 $
|
||||
function roiCalculator() {
|
||||
window.roiCalculator = function roiCalculator() {
|
||||
return {
|
||||
users: 5,
|
||||
hours: 2,
|
||||
@@ -14,9 +14,8 @@ function roiCalculator() {
|
||||
},
|
||||
get payback() {
|
||||
const annualCost = 5750 + (201 * 12);
|
||||
if (this.savings <= 0) return 999;
|
||||
return Math.max(1, Math.round((annualCost / this.savings) * 12));
|
||||
if (this.savings <= 0) return null;
|
||||
return (annualCost / this.savings) * 12;
|
||||
}
|
||||
};
|
||||
}
|
||||
window.roiCalculator = roiCalculator;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user