From b1b0dc4b0fc1fce6174f1711ab879a8909eeb83d Mon Sep 17 00:00:00 2001 From: bot-frontend Date: Sat, 30 May 2026 23:45:15 +0300 Subject: [PATCH] =?UTF-8?q?fix(tradein):=20recharts=20a11y=20=E2=80=94=20a?= =?UTF-8?q?ria-hidden=20=D1=87=D0=B0=D1=80=D1=82=D1=8B,=20h1,=20aria-label?= =?UTF-8?q?=20th=20(#835)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit axe-core на /ui-preview/estimate, 3 дефекта: 1. svg-img-alt: recharts symbol'ы role=img без accessible-name (Exposure/ Distribution/PriceTrend/PriceHistory) → aria-hidden на wrapper-div чарта (декоративный; данные в заголовке/легенде/тексте карточки). 2. page-has-heading-one: на /ui-preview нет h1 (HeroSummary=h2; real page.tsx h1 есть) → визуально-скрытый h1 «Оценка стоимости квартиры». 3. empty-table-header: пустой (actions-колонка) в Listings/Deals/ StreetDeals → aria-label=«Действия». Refs #835, #801 --- .../src/app/ui-preview/estimate/page.tsx | 18 ++++++++++++++++++ .../src/components/trade-in/DealsCard.tsx | 2 +- .../components/trade-in/DistributionCard.tsx | 3 ++- .../src/components/trade-in/ExposureCard.tsx | 4 +++- .../src/components/trade-in/ListingsCard.tsx | 2 +- .../components/trade-in/PriceHistoryChart.tsx | 3 ++- .../src/components/trade-in/PriceTrendCard.tsx | 3 ++- .../components/trade-in/StreetDealsCard.tsx | 2 +- 8 files changed, 30 insertions(+), 7 deletions(-) diff --git a/tradein-mvp/frontend/src/app/ui-preview/estimate/page.tsx b/tradein-mvp/frontend/src/app/ui-preview/estimate/page.tsx index 31a6775e..47bdb4bb 100644 --- a/tradein-mvp/frontend/src/app/ui-preview/estimate/page.tsx +++ b/tradein-mvp/frontend/src/app/ui-preview/estimate/page.tsx @@ -119,6 +119,24 @@ function PreviewContent() { {/* Те же layout-классы, что у реальной страницы (page.tsx): .page → .result-col (flex-column gap, --container ширина). Без них карточки рендерились узко/«мобильно». */}
+ {/* #835: страница-результат рендерит HeroSummary как h2 — добавляем + визуально-скрытый h1 (page-has-heading-one). На реальной page.tsx h1 + есть в page-title; здесь (preview, аудит) обёртки нет. */} +

+ Оценка стоимости квартиры +

{/* 1. SourcesProgress */} diff --git a/tradein-mvp/frontend/src/components/trade-in/DealsCard.tsx b/tradein-mvp/frontend/src/components/trade-in/DealsCard.tsx index 600a1a92..627c103f 100644 --- a/tradein-mvp/frontend/src/components/trade-in/DealsCard.tsx +++ b/tradein-mvp/frontend/src/components/trade-in/DealsCard.tsx @@ -128,7 +128,7 @@ export function DealsCard({ estimate }: Props) { ₽ / м² Цена сделки Дата - + diff --git a/tradein-mvp/frontend/src/components/trade-in/DistributionCard.tsx b/tradein-mvp/frontend/src/components/trade-in/DistributionCard.tsx index 2be7d03e..e39214c8 100644 --- a/tradein-mvp/frontend/src/components/trade-in/DistributionCard.tsx +++ b/tradein-mvp/frontend/src/components/trade-in/DistributionCard.tsx @@ -94,7 +94,8 @@ export function DistributionCard({ estimate }: Props) { -
+ {/* #835: декоративный чарт — aria-hidden (данные в тексте/легенде карточки). */} +
-
+ {/* #835: чарт декоративный (данные — в заголовке/легенде/тексте карточки); + aria-hidden убирает recharts symbol'ы role="img" без accessible-name. */} +