USWDS Futures LabIndependent research and comparison pilot

Documentation

Native dark-mode support

Status: Prototype. Automated evidence may exist; human review is pending.

Category: Cross-component capability
Baseline: USWDS v3.14.0 (npm distribution)
Proposal: A semantic token layer over the official component assets.

Why this exists

USWDS issue #5069 asked for personalization, including light/dark preferences, and was closed as not planned amid limited maintainer capacity. Issue #4644 explored CSS custom properties and moved into a broader discussion. Issue #4577 is a component-specific example: an accordion icon treatment that must be evaluated on the whole component, not a single screenshot. Issue #4407 is a reminder that dark mode is not the same as a contrast preference.

The lab does not claim these issues were rejected on technical grounds. It tests one small, reversible approach.

What stable USWDS provides

USWDS 3.14.0 ships a mature light theme and compile-time Sass settings. It does not ship a runtime dark theme, an explicit user override, or a documented set of semantic runtime tokens that cover the components in this lab. Many teams add their own overrides; those overrides are rarely tested across states, forced colors, and no-JavaScript conditions.

What is proposed

site/assets/experiment.css adds a small semantic token layer (--fx-*) and selector overrides. It:

The explicit preference is exposed through the user preferences panel, not through a second control inside every component.

What changed in the lab

Only the experimental pane changes. The baseline pane keeps the official assets and does not load experiment.css. The fixture markup is shared by both panes. The baseline still includes a small fixture stylesheet for page framing, which is labelled in the evidence.

Evidence status

Automated evidence is collected by npm run evidence and published on the lab evidence page after a build. A successful collection is not a review. The decision is recorded in the central decision log: accepted as a lab experiment on 2026-11-20, with the stated limitations.

Known limitations

Back to experiments · Source lock