fix(frontend): raise dark contrast, expand hit areas, and surface input limits
Independent Staging Quality Gate / validate (push) Successful in 9m19s
Independent Staging Quality Gate / publish (push) Successful in 9m54s

Dark muted surfaces missed WCAG AA; action and tertiary tokens plus a 32-pair contract close that. Hit targets, remaining-count, and Enter-to-send follow the interaction audit without changing visual sizes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-30 11:19:50 +08:00
co-authored by Cursor
parent b43808b016
commit e8fa1ce4ea
20 changed files with 555 additions and 40 deletions
@@ -0,0 +1,31 @@
import {
characterRemainingAnnouncement,
characterRemainingLabel,
characterRemainingVisible,
} from "@/lib/character-remaining";
export function CharacterRemaining({
id,
length,
maxLength,
}: {
id: string;
length: number;
maxLength: number;
}) {
if (!characterRemainingVisible(length, maxLength)) return null;
const remaining = maxLength - length;
const atLimit = remaining <= 0;
return (
<span
id={id}
className="character-remaining"
data-limit={atLimit ? "true" : undefined}
aria-live="polite"
aria-atomic="true"
>
<span aria-hidden="true">{characterRemainingLabel(remaining, maxLength)}</span>
<span className="sr-only">{characterRemainingAnnouncement(remaining, maxLength)}</span>
</span>
);
}