From ddb0dbf86c2b9f45da2f7413158e1469a3805a7e Mon Sep 17 00:00:00 2001 From: bot-frontend Date: Sun, 31 May 2026 10:55:07 +0300 Subject: [PATCH] fix(tradein): money-screen contrast AA (#834 fixup) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit axe design-loop на /ui-preview/estimate выявил 9 оставшихся serious color-contrast нод (прошлый PR не покрыл): - SellTimeSensitivity.tsx: хардкод #6b7280 @10px на тонир. KPI-карточках (#dcfce7/#dbeafe/#fef3c7/#fee2e2) = 3.95-4.4:1 → #5f6570 (≥4.8:1). - PriceTrendCard.tsx: тренд-стрелка ▲/▼ красилась viz-палитрой (var(--viz-3)=#36a558 3.14:1 / --accent-2) — bar-цвета, не для текста. → семантические var(--success)/var(--danger) ≥4.9:1 на белом. Verified: axe wcag2a/2aa/21a/21aa на /ui-preview/estimate → 0 violations (было 9), 29 passes, без регрессий. Refs #834 --- .../frontend/src/components/trade-in/PriceTrendCard.tsx | 4 +++- .../frontend/src/components/trade-in/SellTimeSensitivity.tsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tradein-mvp/frontend/src/components/trade-in/PriceTrendCard.tsx b/tradein-mvp/frontend/src/components/trade-in/PriceTrendCard.tsx index 63ccf090..9d30f3d8 100644 --- a/tradein-mvp/frontend/src/components/trade-in/PriceTrendCard.tsx +++ b/tradein-mvp/frontend/src/components/trade-in/PriceTrendCard.tsx @@ -65,7 +65,9 @@ export function PriceTrendCard({ estimate }: Props) {
За {data.length} мес.
-
+ {/* #834 a11y: viz-палитра (--viz-3 #36a558 3.14:1 / --accent-2) — bar-цвета, + на белом тексте не проходят AA. Семантические токены: success/danger ≥4.9:1. */} +
{up ? "▲" : "▼"} {Math.abs(changePct).toFixed(1)}%
diff --git a/tradein-mvp/frontend/src/components/trade-in/SellTimeSensitivity.tsx b/tradein-mvp/frontend/src/components/trade-in/SellTimeSensitivity.tsx index aa7e1fa3..fc57a1af 100644 --- a/tradein-mvp/frontend/src/components/trade-in/SellTimeSensitivity.tsx +++ b/tradein-mvp/frontend/src/components/trade-in/SellTimeSensitivity.tsx @@ -41,11 +41,11 @@ function BucketCard({ bucket }: { bucket: SellTimeBucket }) { {hasData ? `~${bucket.median_exposure_days} дн.` : "—"} {hasData && bucket.p25_days != null && bucket.p75_days != null && ( -
+
обычно {bucket.p25_days}–{bucket.p75_days} дн.
)} -
+
{bucket.n_lots > 0 ? `${bucket.n_lots} аналог${bucket.n_lots === 1 ? "" : bucket.n_lots < 5 ? "а" : "ов"}` : "нет данных"}