feat(a11y): WCAG AA polish on the site onboarding flow
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled
- index.css: add visible :focus-visible rings for .site-card-button and .site-button so keyboard users can see where focus lives - SiteCard: drop outline:none, add aria-pressed and aria-label so screen readers announce selection state - SiteButton: add the .site-button class for the shared focus ring - SiteDisclaimerScreen: keyboard skip via Enter / Space / Escape, a role="region" + aria-label wrapper and aria-live="polite" on the message; honour prefers-reduced-motion on the fade - IntroVideoPlayer: role="region" with a skip hint in aria-label, preload="auto", and aria-hidden on the decorative caption span
This commit is contained in:
@@ -22,23 +22,18 @@ export function SiteCard({
|
||||
return "#b8b8b8";
|
||||
};
|
||||
|
||||
const getBorder = (): string => {
|
||||
if (selected) return "3px solid #a8d5a2";
|
||||
if (isSituation) return "3px solid rgba(255, 255, 255, 0.55)";
|
||||
if (disabled) return "3px solid rgba(255, 255, 255, 0.55)";
|
||||
return "3px solid rgba(255, 255, 255, 0.55)";
|
||||
};
|
||||
const borderColor = selected ? "#a8d5a2" : "rgba(255, 255, 255, 0.55)";
|
||||
|
||||
const getTextColor = (): string => {
|
||||
if (disabled) return "rgba(77, 77, 77, 0.72)";
|
||||
return "#4d4d4d";
|
||||
};
|
||||
const textColor = disabled ? "rgba(77, 77, 77, 0.72)" : "#4d4d4d";
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={onSelect}
|
||||
disabled={disabled}
|
||||
aria-pressed={selected}
|
||||
aria-label={label}
|
||||
className="site-card-button"
|
||||
style={{
|
||||
width: isSituation
|
||||
? "clamp(220px, 24vw, 300px)"
|
||||
@@ -46,21 +41,20 @@ export function SiteCard({
|
||||
height: isSituation
|
||||
? "clamp(48px, 6vw, 60px)"
|
||||
: "clamp(140px, 18vw, 180px)",
|
||||
border: getBorder(),
|
||||
border: `3px solid ${borderColor}`,
|
||||
background: getBackground(),
|
||||
cursor: disabled ? "not-allowed" : "pointer",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
transition: "all 0.15s ease",
|
||||
outline: "none",
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
{!imagePath && (
|
||||
<span
|
||||
style={{
|
||||
color: getTextColor(),
|
||||
color: textColor,
|
||||
fontSize: isSituation
|
||||
? "clamp(14px, 1.8vw, 22px)"
|
||||
: "clamp(10px, 1.5vw, 14px)",
|
||||
|
||||
Reference in New Issue
Block a user