Closed Bug 1777113 Opened 2 years ago Closed 2 years ago

Reader mode ignores web appearance selection when Increase Contrast is active

Categories

(Toolkit :: Reader Mode, defect, P2)

Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
104 Branch
Accessibility Severity s2
Tracking Status
firefox104 --- verified

People

(Reporter: morgan, Assigned: morgan)

Details

(Keywords: access)

Attachments

(1 file)

STR:

  1. Select "dark" in about:preferences web appearance section
  2. Enable increase contrast: system prefs > accessibility > display > increase contrast
  3. Open a page in reader mode

Expected:
Reader mode is rendered in dark mode colors

Actual:
Reader mode is rendered black on white

I think this has to do with the logic we use for deciding which theme to use. We check if (prefers-contrast) is enabled, and if so choose the "hcm" theme. The prefers-contrast media query is true for both windows HCM and macOS's increase contrast. When win HCM is active, we do want to use the "hcm" reader theme to ensure semantic color usage, but I think macOS users are more likely to expect/desire a high-contrast version of their chosen web appearance theme.

I think we can rely on forced-colors here instead of prefers-contrast since the former relies on mUseDocumentColors in PreferenceSheet and the latter has some additional logic to permit mAccessibiilityTheme enabled && FF HCM Disabled which is a common macOS use case.

Assignee: nobody → mreschenberg
Attachment #9283296 - Attachment description: WIP: Bug 1777113: Use forced-colors media query instead of prefers-contrast to tell user preference for HCM theme r?Itiel → Bug 1777113: Use forced-colors media query instead of prefers-contrast to tell user preference for HCM theme r?Itiel
Severity: -- → S2
Priority: -- → P2
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/307dd529e2a3
Use forced-colors media query instead of prefers-contrast to tell user preference for HCM theme r=Itiel
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Flags: qe-verify+

Reproduced the issue with Firefox 104.0a1 (2022-06-28) on macOS by following the STR from comment 0. Reader mode does not have dark mode enabled.
The issue is verified fixed with Firefox 104.0b5 (20220802185803) on macOS 11. Reader mode has dark mode enabled.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Accessibility Severity: --- → s2
Whiteboard: [access-s2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: