From 9f9eebfcbf60eb7130ada34b03400eefa274b745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Fri, 18 Sep 2026 12:06:16 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=8E=A8=20colored=20text=20reaches?= =?UTF-8?q?=20WCAG=20AA=20contrast=20-=20measured=20in=20light=20mode=20on?= =?UTF-8?q?=20the=20#F7F7F7=20page:=20brand=20as=20text=202.5:1,=20=20=20w?= =?UTF-8?q?arning=202.0:1,=20success=203.1:1,=20destructive=204.2:1=20(AA?= =?UTF-8?q?=20needs=204.5:1)=20-=20new=20text=20tokens=20primary/success/w?= =?UTF-8?q?arning/info/destructive-text:=20darker=20in=20=20=20light=20mod?= =?UTF-8?q?e,=20equal=20to=20the=20fills=20in=20dark=20mode;=20fills=20sta?= =?UTF-8?q?y=20as=20they=20are=20-=20light=20primary=20text=20is=20--brand?= =?UTF-8?q?-ink,=20or=20for=20a=20custom=20palette=20color=20the=20=20=20d?= =?UTF-8?q?arkest-needed=20step=20of=20its=20hue=20(accentTextLightness,?= =?UTF-8?q?=20tested=20across=20hues)=20-=20every=20text-{primary,success,?= =?UTF-8?q?warning,info,destructive}=20utility=20moves=20to=20=20=20its=20?= =?UTF-8?q?-text=20token=20(253=20uses);=20opacity=20variants=20stay=20dec?= =?UTF-8?q?orative=20-=20token=20doc=20records=20the=20rule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/ui/ui-redesign-tokens.md | 11 ++++++++ src/app.tsx | 2 +- src/components/ai/celebi-launcher.tsx | 2 +- src/components/ai/note-studio-panel.tsx | 2 +- .../appointments/book-appointment-form.tsx | 2 +- .../appointments/publish-slots-form.tsx | 2 +- .../appointments/reschedule-form.tsx | 2 +- .../attendance/attendance-report-view.tsx | 2 +- src/components/builder/builder-header.tsx | 2 +- src/components/classes/blueprint-panel.tsx | 2 +- .../courses/course-subjects-panel.tsx | 4 +-- .../courses/course-teachers-panel.tsx | 2 +- .../dashboard/command-search-field.tsx | 2 +- src/components/events/event-form.tsx | 2 +- src/components/exams/answer-sheet-view.tsx | 8 +++--- src/components/exams/bank-question-picker.tsx | 6 ++--- src/components/exams/exam-form.tsx | 2 +- src/components/exams/exam-questions-panel.tsx | 10 +++---- src/components/exams/exam-room-ws.tsx | 12 ++++----- src/components/exams/grade-form.tsx | 2 +- src/components/exams/question-form.tsx | 6 ++--- .../homework/homework-report-view.tsx | 2 +- .../homework/homework-submission-panel.tsx | 4 +-- src/components/insights/insight-detail.tsx | 10 +++---- .../insights/insight-run-report.tsx | 6 ++--- .../insights/insight-runs-table.tsx | 4 +-- src/components/layout/celebi-markdown.tsx | 2 +- src/components/layout/celebi-panel.tsx | 6 ++--- src/components/layout/celebi-thread-list.tsx | 2 +- src/components/layout/mobile-nav-sheet.tsx | 4 +-- .../layout/network-status-banner.tsx | 2 +- src/components/layout/notification-center.tsx | 6 ++--- src/components/layout/route-error.tsx | 2 +- src/components/layout/route-guard.tsx | 2 +- src/components/layout/side-nav.tsx | 6 ++--- src/components/marks/marks-report-view.tsx | 8 +++--- src/components/meals/meal-menu-card.tsx | 2 +- src/components/messages/gmail-compose-box.tsx | 6 ++--- src/components/messages/gmail-mail-detail.tsx | 8 +++--- src/components/messages/gmail-mail-row.tsx | 6 ++--- .../modules/module-catalog-grid.tsx | 2 +- src/components/notes/note-card.tsx | 4 +-- src/components/notes/note-document.tsx | 2 +- src/components/notes/note-files-panel.tsx | 6 ++--- src/components/notes/note-form.tsx | 4 +-- src/components/notes/note-import-panel.tsx | 2 +- src/components/notes/note-rich-editor.tsx | 2 +- src/components/notes/podcast-panel.tsx | 2 +- src/components/rag/rag-citations.tsx | 2 +- src/components/rag/rag-message-row.tsx | 4 +-- src/components/rag/rag-thread-list.tsx | 2 +- src/components/sessions/session-roll-call.tsx | 2 +- src/components/ui/alert.tsx | 8 +++--- src/components/ui/badge.tsx | 6 ++--- src/components/ui/button.tsx | 2 +- src/components/ui/combobox.tsx | 2 +- src/components/ui/confirm-dialog.tsx | 2 +- src/components/ui/date-picker.tsx | 2 +- src/components/ui/dropdown-menu.tsx | 2 +- src/components/ui/input.tsx | 2 +- src/components/ui/select.tsx | 8 +++--- src/components/ui/table-row-actions.tsx | 4 +-- src/components/ui/textarea.tsx | 2 +- .../users/account-profile-dialog.tsx | 2 +- src/components/users/avatar-upload.tsx | 2 +- src/components/users/badge-grid.tsx | 8 +++--- .../users/parent-students-panel.tsx | 4 +-- src/components/users/profile-form.tsx | 2 +- src/components/users/profile-memberships.tsx | 4 +-- src/components/users/user-avatar.tsx | 2 +- src/components/users/user-search-select.tsx | 2 +- .../whiteboard/board-bulk-invite.tsx | 4 +-- .../whiteboard/whiteboard-room-ws.tsx | 4 +-- src/index.css | 20 +++++++++++++- src/lib/appointment-status.ts | 6 ++--- src/lib/attendance-status.ts | 8 +++--- src/lib/payments.ts | 6 ++--- src/lib/schedule-status.ts | 8 +++--- src/pages/academic-years-page.tsx | 2 +- src/pages/appointments-page.tsx | 6 ++--- src/pages/bank-question-detail-page.tsx | 4 +-- src/pages/builder-login-page.tsx | 4 +-- src/pages/calendar-page.tsx | 2 +- src/pages/class-detail-page.tsx | 2 +- src/pages/classes-page.tsx | 4 +-- src/pages/course-detail-page.tsx | 4 +-- src/pages/courses-page.tsx | 2 +- src/pages/dashboard-page.tsx | 2 +- src/pages/event-detail-page.tsx | 2 +- src/pages/events-page.tsx | 2 +- src/pages/exam-detail-page.tsx | 6 ++--- src/pages/instance-detail-page.tsx | 4 +-- src/pages/live-monitor-page.tsx | 8 +++--- src/pages/login-page.tsx | 8 +++--- src/pages/meal-detail-page.tsx | 10 +++---- src/pages/messages-page.tsx | 12 ++++----- src/pages/my-students-page.tsx | 2 +- src/pages/payment-statement-page.tsx | 4 +-- src/pages/payments-page.tsx | 14 +++++----- src/pages/pomodoro-page.tsx | 6 ++--- src/pages/profile-page.tsx | 2 +- src/pages/question-bank-page.tsx | 2 +- src/pages/question-detail-page.tsx | 14 +++++----- src/pages/questions-page.tsx | 10 +++---- src/pages/register-page.tsx | 4 +-- src/pages/settings-page.tsx | 12 ++++----- src/pages/student-marks-page.tsx | 2 +- src/pages/whiteboard-page.tsx | 10 +++---- src/stores/accent-text.test.tsx | 25 ++++++++++++++++++ src/stores/preferences-context.tsx | 26 +++++++++++++++++++ 110 files changed, 313 insertions(+), 233 deletions(-) create mode 100644 src/stores/accent-text.test.tsx diff --git a/docs/ui/ui-redesign-tokens.md b/docs/ui/ui-redesign-tokens.md index d9dfde0..34453eb 100644 --- a/docs/ui/ui-redesign-tokens.md +++ b/docs/ui/ui-redesign-tokens.md @@ -31,6 +31,17 @@ Dark: Success, warning, destructive, and info remain semantic. Custom palette choice continues to override `--ui-accent`, which feeds `--primary`. +Colored text uses the `*-text` tokens, never the fills: `text-primary-text`, +`text-success-text`, `text-warning-text`, `text-info-text`, +`text-destructive-text`. The fills (`bg-primary`, `bg-warning/10`, dots, +rings) keep their bright values; the text tokens are darker in light mode so +small text reaches WCAG AA (4.5:1) on the `#F7F7F7` page and white cards — +the brand fill as text measured 2.5:1 and warning 2.0:1. Light-mode primary +text is `--brand-ink`, or for a custom palette color the darkest-needed step +of that hue (`accentTextLightness` in `preferences-context.tsx`). In dark mode +the text tokens equal the fills. Opacity variants like `text-primary/30` stay +on the fill for decoration only. + ## Typography - UI: native system sans (`ui-sans-serif`, `system-ui`, `-apple-system`, diff --git a/src/app.tsx b/src/app.tsx index 44d626e..10c9847 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -34,7 +34,7 @@ function RootErrorFallback(props: { error: unknown; reset: () => void }) { return (
-
+
diff --git a/src/components/ai/celebi-launcher.tsx b/src/components/ai/celebi-launcher.tsx index 5e855a2..caa5429 100644 --- a/src/components/ai/celebi-launcher.tsx +++ b/src/components/ai/celebi-launcher.tsx @@ -47,7 +47,7 @@ export function CelebiLauncher() { return (
-
+
diff --git a/src/components/ai/note-studio-panel.tsx b/src/components/ai/note-studio-panel.tsx index dd89c46..b207152 100644 --- a/src/components/ai/note-studio-panel.tsx +++ b/src/components/ai/note-studio-panel.tsx @@ -79,7 +79,7 @@ export function NoteStudioPanel() { when={selected()} fallback={
-
+
diff --git a/src/components/appointments/book-appointment-form.tsx b/src/components/appointments/book-appointment-form.tsx index 6f16a32..b3869e7 100644 --- a/src/components/appointments/book-appointment-form.tsx +++ b/src/components/appointments/book-appointment-form.tsx @@ -66,7 +66,7 @@ export function BookAppointmentForm(props: { />
- {error() &&

{error()}

} + {error() &&

{error()}

}
- {error() &&

{error()}

} + {error() &&

{error()}

}
- {error() &&

{error()}

} + {error() &&

{error()}

}