mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(landing): add a live system status indicator to the footer (#641)
Adds /api/status to the landing Pages worker, HEAD-probing demo.snapotter.com and docs.snapotter.com with a 2 second per-attempt deadline and one retry. snapotter.com is not probed; the worker answering the request is the proof it is up. The footer badge ships grey in the static HTML and only upgrades once the route answers. A rejected fetch, a non-ok response, an unparseable body, and an unrecognized verdict all leave it grey, so it never claims green on its own. Color lives in the dot, never the label: `--color-success` scores 4.498:1 against the footer's `--color-background-alt`, just under AA. Four labels across 21 locales.
This commit is contained in:
@@ -159,4 +159,13 @@ describe("landing", () => {
|
||||
expectPair(landing, "muted", "background");
|
||||
expectPair(landing, "dark-fg", "dark-bg");
|
||||
});
|
||||
|
||||
// The footer status dot is a graphic, so WCAG 1.4.11's 3:1 applies rather
|
||||
// than AA's 4.5. Note "success" clears 3:1 here but not 4.5, which is why the
|
||||
// badge's label stays muted while only the dot takes a state color.
|
||||
it("footer status dot clears 3:1 non-text on the footer surface", () => {
|
||||
for (const dot of ["muted", "success", "primary-ink", "danger"]) {
|
||||
expectPair(landing, dot, "background-alt", 3);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user