Skip to content

Commit 5fe1b79

Browse files
committed
fix(a11y): fix 4 contrast failures in TerminalDemo
- .td-body: add explicit color #e8e8f0 to override inherited dark VitePress text color on #0f0d1a background (was ~1.5:1, now n/a) - .td-hints spans: rgba(255,255,255,0.22) → 0.55 (2.5:1 → 6.1:1 ✓) - .td-replay-label: rgba(153,51,255,0.55) → #aa55ff (1.9:1 → 5.0:1 ✓) - .td-mark: rgba(153,51,255,0.65) → #aa55ff (2.3:1 → 5.0:1 ✓)
1 parent 7403cd6 commit 5fe1b79

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

docs/.vitepress/theme/TerminalDemo.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ onUnmounted(() => {
288288
/* ── Body ────────────────────────────────────────────────────────────── */
289289
.td-body {
290290
background: #0f0d1a;
291+
/* Fix: override inherited VitePress text color (dark on dark = fail) */
292+
color: #e8e8f0;
291293
padding: 12px 14px 10px;
292294
height: 240px;
293295
overflow: hidden;
@@ -413,12 +415,14 @@ onUnmounted(() => {
413415
width: 12px;
414416
flex-shrink: 0;
415417
display: inline-block;
416-
color: rgba(153, 51, 255, 0.65);
418+
/* Fix: rgba(153,51,255,0.65) on #0f0d1a = 2.3:1 → #aa55ff = 5.0:1 ✓ WCAG AA */
419+
color: #aa55ff;
417420
}
418421
419422
/* ── Replay ──────────────────────────────────────────────────────────── */
420423
.td-replay-label {
421-
color: rgba(153, 51, 255, 0.55);
424+
/* Fix: rgba(153,51,255,0.55) on #0f0d1a = 1.9:1 → #aa55ff = 5.0:1 ✓ WCAG AA */
425+
color: #aa55ff;
422426
font-size: 10.5px;
423427
margin-top: 7px;
424428
padding: 0 2px;
@@ -436,7 +440,8 @@ onUnmounted(() => {
436440
margin-top: 8px;
437441
padding-top: 7px;
438442
border-top: 1px solid rgba(255, 255, 255, 0.06);
439-
color: rgba(255, 255, 255, 0.22);
443+
/* Fix: rgba(255,255,255,0.22) on #0f0d1a ≈ 2.5:1 → 0.55 = 6.1:1 ✓ WCAG AA */
444+
color: rgba(255, 255, 255, 0.55);
440445
font-size: 10px;
441446
}
442447
</style>

0 commit comments

Comments
 (0)