fix(player): the Plex player's fills hold on its chrome: an amber head on a white played part

A light theme's accent as a fill on the always-dark chrome was ~2.8:1 (Slate), under the 3:1 a
control needs. A native checkbox and slider tint with `accent-chosen` (the accent elsewhere, the
media amber under `media-marks`), and so does the skip button's countdown. The progress bar plays
white with an amber head: amber there marks a place, as the intro / credits markers do, and an amber
played part made a marker ahead of the head read as already played (owner's choice of three).
This commit is contained in:
2026-10-10 22:56:09 +02:00
parent 93192dadd8
commit 663a7e8012
4 changed files with 27 additions and 8 deletions
+12
View File
@@ -100,6 +100,18 @@ describe("the media colours", () => {
);
expect(buttons).toMatch(/aria-pressed:text-chosen/);
expect(buttons).toMatch(/aria-expanded:text-chosen/);
// A native checkbox's and slider's fill is the chosen colour too (the player's settings), and so
// is the skip button's countdown: a fill that must be seen on the chrome.
const native = readFileSync(
new URL("../components/ui/NativeControls.tsx", import.meta.url),
"utf8",
);
expect(native).not.toMatch(/\baccent-accent\b/);
expect(native.match(/\baccent-chosen\b/g)).toHaveLength(2);
const plex = readFileSync(new URL("../components/PlexPlayer.tsx", import.meta.url), "utf8");
// No accent fill at all on the Plex player: its progress bar's played part is white and its head
// the media amber — a marked place, like the intro / credits markers and the clip's playhead.
expect(plex).not.toMatch(/\bbg-accent\b/);
// (A pressed FILLED button keeps the accent fill under its own `text-accent-fg`.)
expect(buttons).not.toMatch(/aria-(pressed|expanded):text-accent(?!-)/);
// The player's own components are chrome throughout: nothing chosen there is the accent's text