From b19d8fdc837abd14ddb73c15fb9ff5ee5c068c1a Mon Sep 17 00:00:00 2001 From: zhangxiang Date: Tue, 1 Sep 2026 11:27:51 +0800 Subject: [PATCH] fix(a11y): guard Hero entrance animations with reduced-motion; tone down founder card shadow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Hero 入场 motion.* 未守卫 reduced-motion,与 ScrollReveal 范式不一致 - 新增 rise() 守卫:reduce 时传空 initial/animate,元素静态可见 - 创始团队引言卡 shadow-xl 降级 shadow-sm + 品牌红 hairline 边框 --- src/app/(marketing)/home-content-v15.tsx | 32 ++++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app/(marketing)/home-content-v15.tsx b/src/app/(marketing)/home-content-v15.tsx index 6297dad..75e8071 100644 --- a/src/app/(marketing)/home-content-v15.tsx +++ b/src/app/(marketing)/home-content-v15.tsx @@ -175,6 +175,14 @@ function HeroSection({ heroData }: { const secondaryCtaHref = heroData?.secondaryCtaHref || '/products'; const slogan = siteConfig.slogan || COMPANY_INFO.slogan; + // reduced-motion 守卫:与 ScrollReveal 同范式——reduce 时传空 initial/animate, + // 元素直接以自然(可见)状态渲染,零位移/淡入;默认(非 reduce,含首帧 null)正常动画。 + const rise = (y: number, delay: number, duration = 0.35) => ({ + initial: reduceMotion ? {} : { opacity: 0, y }, + animate: reduceMotion ? {} : { opacity: 1, y: 0 }, + transition: { duration: reduceMotion ? 0 : duration, delay: reduceMotion ? 0 : delay, ease: EASE_OUT }, + }); + return (
@@ -221,9 +227,7 @@ function HeroSection({ heroData }: { {/* 主标题:大胆、直接(深底白色 / 浅底墨色,随 HERO_VARIANT 切换) */} {heading} @@ -231,21 +235,17 @@ function HeroSection({ heroData }: { {/* 主张:紧随声明之后,回答「凭什么信你」(声明先行,数据下沉至成果带) */} {subheading && ( - + {subheading} )} {/* CTA 按钮组 */} {ctaLabel} @@ -637,7 +637,7 @@ function FounderQuoteSection({ pageCopy }: { pageCopy?: HomePageCopy | null }) { />
-
+