Open jongund opened 1 month ago
Wikipedia supports light
and dark
color preferences through an "appearance" button, which visually looks like eye glasses at the beginning (e.g. top) of the page.
Operating systems support
light
anddark
color themes, typically the setting is part of appearance or display options and not in the "accessibility" options section.The
light
color theme is typically the default on most operating systems. Authors can identify the color theme setting through the CSS media queryprefers-color-theme
.The
dark
color theme is associated with lower power consumption, less eye strain and considered easier to read or less disruptive in dark settings (e.g. night time). People with some types of visual impairments prefer to use the dark color theme as their default. When the user selects the dark color theme the CSS media query prefers-color-theme is set to dark.Questions:
- What are the best practices for support the
prefers-color-theme
media query to make web pages more accessible?- Which WCAG requirements apply to this user preference?
- What should authors do to support both the
light
anddark
color themes?
It is best to give the user a choice between the system default, light or dark, as not all people can read well on dark backgrounds.
Operating systems support
light
anddark
color themes, typically the setting is part of appearance or display options and not in the "accessibility" options section.The
light
color theme is typically the default on most operating systems. Authors can identify the color theme setting through the CSS media queryprefers-color-theme
.The
dark
color theme is associated with lower power consumption, less eye strain and considered easier to read or less disruptive in dark settings (e.g. night time). People with some types of visual impairments prefer to use the dark color theme as their default. When the user selects the dark color theme the CSS media query prefers-color-theme is set to dark.Questions:
prefers-color-theme
media query to make web pages more accessible?light
anddark
color themes?