Closed Bug 1902068 Opened 1 year ago Closed 1 year ago

Fix HCM styling of input type="range"

Categories

(Core :: Layout: Form Controls, defect, P3)

Desktop
Windows 11
defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: ini, Assigned: ini)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In the Windows 11 Night Sky Contrast Theme, the input type="range" slider does not have any active or hover styling. In non-HCM, the slider has color changes for both states. A possible set of colors for HCM could be:

  1. On hover, the slider track and slider thumb outline is highlighted with the SelectedItem color.
  2. In the active state, the slider track has the SelectedItem color while the slider thumb outline has the ButtonText color.

Instead of the slider thumb outline being highlighted, the inner fill could also be recolored to match the non-HCM styling. See Figma designs of HCM slider for examples.

This is reproducible by going to the example range input on MDN with Windows 11 Night Sky enabled under Settings -> Accessibility -> Contrast themes.

Severity: -- → S3
Priority: -- → P3

Relevant code is here: https://searchfox.org/mozilla-central/rev/b11735b86bb4d416c918e2b2413456561beff50c/widget/Theme.cpp#912-934

In particular ComputeRangeProgressColors and co don't account for the active / hover / etc here.

Same for ComputeRangeTrackColors here.

So the fix should be relatively simple, the tricky thing is verifying the colors chosen work for all HCM themes on Windows 10 and 11...

Assignee: nobody → ini
Attachment #9408684 - Attachment description: WIP: Bug 1902068 - Fix HCM styling of input type="range". r=#accessibility-frontend-reviewers → Bug 1902068 - Fix HCM styling of input type="range". r=#accessibility-frontend-reviewers
Status: NEW → ASSIGNED

After consulting with the a11y team, we decided to go with this design for the default, hover, active, and disabled states. I have submitted a patch with these changes.

Pushed by ini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/49710ab427d4 Fix HCM styling of input type="range". r=accessibility-frontend-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: