That’s a truly thought-provoking question.
Introducing an Alternative Contrast Variation
Including a control with adequate contrast ratio for users to switch to a display with ample contrast is actually considered a valid technique to fulfill WCAG's contrast standards.
However, there are certain requirements that must be met:
- The link or control on the original page must also adhere to the required contrast levels of the designated success criterion. (If the user cannot perceive the control, they may not be able to utilize it to navigate to the new page.)
- The new page must encompass all the same content and functionality as the original page.
- The new page should comply with all the success criteria for the targeted level of conformity. (In other words, the new page cannot only focus on achieving the desired contrast level without adherence to other guidelines).
If your goal is simply to switch styles, it is probable that conditions 2 and 3 would be fulfilled. You would just need to incorporate a button for switching between styles.
You could create a second stylesheet (.css file) explicitly defining the contrast version. Here's how you can implement this:
<link href="contrast.css" rel="alternate stylesheet" type="text/css" title="Contrast Styles">
This approach allows browsers supporting this feature (such as Firefox) to offer users the option to switch styles. Refer to Alternative style sheets
Subsequently, you can include a button in your webpage that activates this stylesheet via JavaScript, along with a media query importing it if @media (prefers-contrast: more)
.
It remains unclear whether your audit tools will grant approval while the alternate stylesheet is active. Ultimately, a manual review is necessary for legal compliance, ensuring conformance with 1.4.3.
How Can Users Specify Their Contrast Preference?
In the past, there was a debate about whether a font-size control should be embedded into websites, given its long-standing availability within browsers. While WCAG did not mandate it (to my knowledge), proponents argued that many users were unfamiliar with browser settings.
A similar argument can be made for contrast modes (as many users might not be well-versed in OS contrast settings or lack access to them), which is why WCAG now requires a control regardless.
Is There a Method for Browsers or Operating Systems to Adjust Contrast Preferences Based on Daylight Conditions, Themes, or Ambient Light Sensors?
In Android, there are options to utilize the dark theme setting based on daylight circumstances, and possibly some applications permitting adjustment according to ambient light levels.
To my knowledge, there is no mechanism enabling contrast mode adjustments based on these factors, not even in Windows 11, which has significantly enhanced its accessibility contrast themes.
It could be argued that such adaptations signify the user's need for heightened contrast, irrespective of day or night, light or dark themes.