Whether websites are legally required to respect the user’s dark mode preference is not entirely clear-cut. Neither WCAG, the ADA, nor EN 301 549 explicitly mention dark mode. However, the Swedish Agency for Digital Government (Digg) has interpreted EN 301 549 as requiring it, based on the following clause:
11.7 User preferences
Where software is not designed to be isolated from its platform, and provides a user interface, that user interface shall follow the values of the user preferences for platform settings for: units of measurement, colour, contrast, font type, font size, and focus cursor except where they are overridden by the user.
Why dark mode support is still rare
Many professionals rely mainly on WCAG, because EN 301 549 still lacks supporting documentation of its extensive requirements, and I believe this along with unfamiliarity with Digg’s interpretation explains why dark mode support is still fairly uncommon.
Legal or not, it still matters
Regardless of its legal status, honoring dark mode preferences clearly enhances accessibility. It reduces eye strain, supports users with light sensitivity, and aligns with broader principles of inclusive design.

How to implement
A good implementation of dark mode support should include:
- Two well implemented color schemes, both the light and dark schemes should look good and respect requirements regarding contrasts and visible focus.
- The default behaviour should be to apply the color scheme the user has selected in their system preferences.
- A switch to allow the user to override the system settings. While not legally required, offering a switch is recommended, as it empowers users including those not having access to system settings (for example users on public computers), to choose their preferred viewing mode.
The way to do it is using the media query prefers-color-scheme. Example:
@media (prefers-color-scheme: dark) {
body {
background-color: #000;
color: #fff;
}
}
Further reading (in Swedish)
More information about Digg’s interpretative decision, in Swedish:
Diggs bedömning av kriteriet 11.7 Respektera användarens inställningar (EN 301 549)
Leave a Reply