Guidepup transcript: experiment/dark-mode.html — dark
Method: virtual screen reader over a DOM snapshot. Not a real VoiceOver, NVDA, or JAWS test.
- Run: 2026-11-24T00-32-17-199Z
- Source: @uswds/uswds 3.14.0 (npm)
- Git revision: 5ae55174a465533f294c999f181da47d514b2d75
- Browser: 156.0.8078.4
- Viewport: 1280x850
- Page: experiment/dark-mode.html
- State: dark
- Theme: explicit dark or system dark
- Direction: ltr
Transcript truncated at 400 phrases.
Phrases
Simulator limitation: jsdom reported 18 unsupported pseudo-element style request(s). CSS-generated content may be omitted.
- document
- link, Skip to main content
- banner
- link, USWDS Futures Lab Independent research and comparison pilot
- USWDS Futures Lab
- Independent research and comparison pilot
- end of link, USWDS Futures Lab Independent research and comparison pilot
- navigation, Primary
- link, Overview
- link, Evaluate
- link, Components
- link, Experiments, current page
- link, Landing demo
- link, Community ideas
- link, Evidence
- link, Methodology
- end of navigation, Primary
- end of banner
- main
- paragraph
- Cross-component capability · Prototype available
- end of paragraph
- heading, Native dark-mode support, level 1
- paragraph
- A semantic token layer that lets USWDS components respond to system appearance and an explicit user override without replacing upstream components.
- end of paragraph
- strong
- Review status: accepted.
- end of strong
- Reviewer: Mike Gifford on 2026-11-20. Accepted as a lab experiment; upstream not authorized.
- Evidence: No automated evidence in this build.
- region, Working demonstration
- heading, Working demonstration, level 2
- paragraph
- link, Evaluate this experiment
- link, Open the registered demonstration
- end of paragraph
- list
- listitem, level 1, position 1, set size 4
- link, Accordion
- — baseline and experimental fixtures available.
- end of listitem, level 1, position 1, set size 4
- listitem, level 1, position 2, set size 4
- link, Alert
- — baseline and experimental fixtures available.
- end of listitem, level 1, position 2, set size 4
- listitem, level 1, position 3, set size 4
- link, Banner
- — baseline and experimental fixtures available.
- end of listitem, level 1, position 3, set size 4
- listitem, level 1, position 4, set size 4
- link, Form controls
- — baseline and experimental fixtures available.
- end of listitem, level 1, position 4, set size 4
- end of list
- paragraph
- The evaluation workspace does not mirror keyboard input. Open either implementation independently for keyboard and assistive-technology testing.
- end of paragraph
- end of region, Working demonstration
- region, Proposal and context
- heading, Proposal and context, level 2
- paragraph
- strong
- Status: Prototype. Automated evidence may exist; human review is pending.
- end of strong
- end of paragraph
- paragraph
- strong
- Category:
- end of strong
- Cross-component capability
- strong
- Baseline:
- end of strong
- USWDS v3.14.0 (npm distribution)
- strong
- Proposal:
- end of strong
- A semantic token layer over the official component assets.
- end of paragraph
- heading, Why this exists, level 2
- paragraph
- USWDS issue
- link, #5069
- asked for personalization, including light/dark preferences, and was closed as not planned amid limited maintainer capacity. Issue
- link, #4644
- explored CSS custom properties and moved into a broader discussion. Issue
- link, #4577
- is a component-specific example: an accordion icon treatment that must be evaluated on the whole component, not a single screenshot. Issue
- link, #4407
- is a reminder that dark mode is not the same as a contrast preference.
- end of paragraph
- paragraph
- The lab does not claim these issues were rejected on technical grounds. It tests one small, reversible approach.
- end of paragraph
- heading, What stable USWDS provides, level 2
- paragraph
- 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.
- end of paragraph
- heading, What is proposed, level 2
- paragraph
- code
- site/assets/experiment.css
- end of code
- adds a small semantic token layer (
- code
- --fx-*
- end of code
- ) and selector overrides. It:
- end of paragraph
- list
- listitem, level 1, position 1, set size 5
- follows
- code
- prefers-color-scheme: dark
- end of code
- when no explicit choice is stored;
- end of listitem, level 1, position 1, set size 5
- listitem, level 1, position 2, set size 5
- accepts an explicit
- code
- data-mode="light"
- end of code
- or
- code
- data-mode="dark"
- end of code
- override;
- end of listitem, level 1, position 2, set size 5
- listitem, level 1, position 3, set size 5
- themes the accordion, alert, banner, and form fixtures;
- end of listitem, level 1, position 3, set size 5
- listitem, level 1, position 4, set size 5
- keeps the official USWDS CSS and JavaScript in place;
- end of listitem, level 1, position 4, set size 5
- listitem, level 1, position 5, set size 5
- does not load any third-party dark-mode package.
- end of listitem, level 1, position 5, set size 5
- end of list
- paragraph
- The explicit preference is exposed through the
- link, user preferences panel
- , not through a second control inside every component.
- end of paragraph
- heading, What changed in the lab, level 2
- paragraph
- Only the experimental pane changes. The baseline pane keeps the official assets and does not load
- code
- experiment.css
- end of code
- . 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.
- end of paragraph
- heading, Evidence status, level 2
- paragraph
- Automated evidence is collected by
- code
- npm run evidence
- end of code
- and published on the lab evidence page after a build. A successful collection is not a review. The decision is recorded in
- link, the central decision log
- :
- strong
- accepted as a lab experiment
- end of strong
- on 2026-11-20, with the stated limitations.
- end of paragraph
- heading, Known limitations, level 2
- list
- listitem, level 1, position 1, set size 5
- Four components are covered, not all of USWDS. Header, footer, navigation, tables, cards, and complex form controls are not yet themed.
- end of listitem, level 1, position 1, set size 5
- listitem, level 1, position 2, set size 5
- The upstream alert icon is not recolored; the alert heading carries the meaning.
- end of listitem, level 1, position 2, set size 5
- listitem, level 1, position 3, set size 5
- The experiment relies on
- code
- !important
- end of code
- overrides for some states. That is a maintenance cost and a sign that the semantic token layer does not yet exist upstream.
- end of listitem, level 1, position 3, set size 5
- listitem, level 1, position 4, set size 5
- No real high-contrast OS session, screen reader, or government-service integration has been tested.
- end of listitem, level 1, position 4, set size 5
- listitem, level 1, position 5, set size 5
- Dark mode is not a claim of energy savings.
- end of listitem, level 1, position 5, set size 5
- end of list
- end of region, Proposal and context
- region, Implementation guidance
- heading, Implementation guidance, level 2
- heading, Approach, level 2
- paragraph
- The experiment keeps the official USWDS CSS and JS. It adds one stylesheet with semantic custom properties and a small set of component overrides.
- end of paragraph
- code
- :root { --fx-canvas: #fff; --fx-surface: #f1f3f5; --fx-text: #1b1b1b; --fx-border: #77808b; --fx-link: #005ea2; --fx-focus: #005ea2; /* 6.2:1 on the light surface / } :root[data-mode="dark"] { --fx-canvas: #151c28; --fx-surface: #273448; --fx-text: #f5f6f9; --fx-border: #aab7c8; --fx-link: #86c9fa; --fx-focus: #ffbe2e; / 10.7:1 on the dark canvas / } @media (prefers-color-scheme: dark) { :root[data-mode="system"] { / the same dark values */ } }
- end of code
- paragraph
- code
- data-mode
- end of code
- is set by
- code
- site/assets/fixture.js
- end of code
- from the
- code
- ?theme=
- end of code
- query parameter or the saved preference. The default is
- code
- system
- end of code
- , which is resolved entirely by the media query; no JavaScript is required for the system preference.
- end of paragraph
- heading, Component rules, level 2
- list
- listitem, level 1, position 1, set size 6
- Accordion and banner buttons use
- code
- --fx-surface
- end of code
- for the control and
- code
- --fx-canvas
- end of code
- for the panel.
- end of listitem, level 1, position 1, set size 6
- listitem, level 1, position 2, set size 6
- Alerts use semantic warning/error/info backgrounds and keep a heading; color is not the only cue.
- end of listitem, level 1, position 2, set size 6
- listitem, level 1, position 3, set size 6
- The form input uses
- code
- --fx-canvas
- end of code
- and
- code
- --fx-text
- end of code
- .
- end of listitem, level 1, position 3, set size 6
- listitem, level 1, position 4, set size 6
- strong
- Radio and checkbox containers need explicit treatment.
- end of strong
- Upstream sets
- code
- .usa-radio{background:#fff}
- end of code
- and
- code
- .usa-checkbox{background:#fff}
- end of code
- . The lab sets both the container and the label color in dark mode; otherwise the page shows a white slab or dark-on-dark text.
- end of listitem, level 1, position 4, set size 6
- listitem, level 1, position 5, set size 6
- The banner's small “About this banner” text is visually hidden from assistive technology upstream but is still visible text on narrow screens. It uses
- code
- --fx-link
- end of code
- in dark mode.
- end of listitem, level 1, position 5, set size 6
- listitem, level 1, position 6, set size 6
- Focus is a 3px outline with a 3px offset. The light token is
- code
- #005ea2
- end of code
- (6.2:1 on the light surface and 4.7:1 on the page); the dark token is
- code
- #ffbe2e
- end of code
- (10.7:1 on the dark canvas). The outline sits on the page surface because of the offset, so the contrast is measured against the surface behind it.
- end of listitem, level 1, position 6, set size 6
- end of list
- heading, RTL and logical properties, level 2
- paragraph
- The alert uses
- code
- border-inline-start
- end of code
- and removes the physical left border, so the accent moves to the start side in RTL. Accordion and banner buttons use
- code
- text-align:start
- end of code
- . This is a small demonstration, not a complete multilingual layout.
- end of paragraph
- heading, Forced colors and reduced motion, level 2
- paragraph
- code
- @media(forced-colors: active)
- end of code
- restores a system
- code
- Highlight
- end of code
- focus outline and
- code
- ButtonText
- end of code
- borders. The theme does not set
- code
- forced-color-adjust:none
- end of code
- on components.
- code
- @media(prefers-reduced-motion: reduce)
- end of code
- removes non-essential transitions. Dark mode is not a substitute for either preference.
- end of paragraph
- heading, How to use it, level 2
- list
- listitem, level 1, position 1, set size 4
- code
- fixture/accordion-experiment.html?theme=dark
- end of code
- end of listitem, level 1, position 1, set size 4
- listitem, level 1, position 2, set size 4
- code
- fixture/accordion-experiment.html?theme=system
- end of code
- end of listitem, level 1, position 2, set size 4
- listitem, level 1, position 3, set size 4
- code
- compare.html?component=accordion&theme=dark
- end of code
- end of listitem, level 1, position 3, set size 4
- listitem, level 1, position 4, set size 4
- The preferences panel stores an explicit override in
- code
- localStorage
- end of code
- ; reset removes it.
- end of listitem, level 1, position 4, set size 4
- end of list
- heading, What upstream would need, level 2
- paragraph
- A real contribution would need to map Sass tokens to runtime custom properties, document the supported component matrix, and resolve hard-coded colors in upstream CSS. This experiment does not claim that a short
- code
- --fx-*
- end of code
- list is complete USWDS support.
- end of paragraph
- heading, Known gaps, level 2
- list
- listitem, level 1, position 1, set size 4
- No high-contrast OS session or real screen-reader session.
- end of listitem, level 1, position 1, set size 4
- listitem, level 1, position 2, set size 4
- No header/footer/navigation/table/card coverage.
- end of listitem, level 1, position 2, set size 4
- listitem, level 1, position 3, set size 4
- Some states use
- code
- !important
- end of code
- because upstream selectors have higher specificity.
- end of listitem, level 1, position 3, set size 4
- listitem, level 1, position 4, set size 4
- No measured performance claim; the extra CSS is small, but it has not been benchmarked.
- end of listitem, level 1, position 4, set size 4
- end of list
- end of region, Implementation guidance
- region, Evidence and limitations
- heading, Evidence and limitations, level 2
- paragraph
- No automated evidence in this build.
- end of paragraph
- paragraph
- link, Open the evidence index
- for transcripts, screenshots, axe observations, and coverage gaps.
- end of paragraph
- paragraph
- Automated evidence is not human approval. The decision record remains authoritative.
- end of paragraph
- end of region, Evidence and limitations
- region, Related USWDS history
- heading, Related USWDS history, level 2
- list
- listitem, level 1, position 1, set size 4
- link, #5069 Better personalization support
- (motivation)
- end of listitem, level 1, position 1, set size 4
- listitem, level 1, position 2, set size 4
- link, #4644 CSS variables for theming
- (technical-dependency)
- end of listitem, level 1, position 2, set size 4
- listitem, level 1, position 3, set size 4
- link, #4577 Configurable accordion icon colors
- (component-decision)
- end of listitem, level 1, position 3, set size 4
- listitem, level 1, position 4, set size 4
- link, #4407 Support prefers-contrast
- (separate-requirement)
- end of listitem, level 1, position 4, set size 4
- end of list
- end of region, Related USWDS history
- region, Experiment files
- heading, Experiment files, level 2
- list
Limits
- Guidepup is a simulator over the DOM; CSS-only differences (including dark appearance) are not represented in speech.
- Axe and browser assertions are separate evidence. A transcript difference is not automatically a regression.
- Real assistive-technology testing remains outstanding.