AKRIBIS GroupBrand
Decisiones

ADR-00372026-10-06Propuesta

Este registro está en inglés (ADR-0001).

Render every site light by default and dark only on request

Context and Problem Statement

Every brand file (/tokens/<brand>.css, ADR-0015) carries the roles in light and in dark, and until now the dark roles switched on by themselves under prefers-color-scheme: dark, as well as with data-theme="dark" on the root element. A visitor whose operating system is dark therefore saw every AKRIBIS site dark without asking for it.

The sites’ main audience is regulated: quality assurance, validation, metrology and engineering in pharmaceutical and food plants, on managed corporate machines whose dark setting is often the IT department’s choice, not the reader’s. They print pages, paste screenshots into deviation reports and compare a page with a datasheet that is always white. akribis.info, the site that becomes the standard for every unit (ADR-0036), was built light and offers dark only as a switch. Photographs and product shots (ADR-0034) are cut out on white or on the band; on a dark page they become white boxes.

Should a site follow the operating system, or render light and offer dark as a choice the visitor makes, remembered across pages and visits, without a flash of the wrong theme?

Decision Drivers

Criteria 1 (trust of a regulated buyer), 4 (accessibility) and 5 (works beyond the screen) of ADR-0009; ADR-0015 (one set of roles, proven in both modes); ADR-0031 (the shared layer is one package); ADR-0035 (pages rendered on request are cached at Cloudflare’s edge, in front of the Worker).

Considered Options

Decision Outcome

Proposed: the first option.

Consequences

Confirmation

brand/test/build.test.ts fails when a brand file contains prefers-color-scheme or lacks the data-theme="dark" block; brand/test/shape.test.ts checks the same for shape.css; brand/test/patterns.test.ts checks that the shell carries the head script before the token styles, that the toggle renders hidden with aria-pressed and the theme-toggle marker, and the checker requires the marker on every page of every kind (anatomy.yaml).

More Information

akribis.info docs/19-arquitectura-de-informacion.md, §5: the utility bar carries the theme («tema (claro/oscuro)»).