Text selection while Windows High Contrast is running becomes invisible in Firefox
Categories
(Core :: Layout: Text and Fonts, defect, P1)
Tracking
()
People
(Reporter: stommepoes, Assigned: emilio)
Details
(Keywords: access, Whiteboard: [access-p1])
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
Steps to reproduce:
- Turn on Windows High Contrast (Windows 10, 8, 7, XP, doesn't matter):
On Windows, activate the High Contrast setting using the Alt+Shift+PrtScn shortcut, or access it via the Access Settings (Windows Key + U, or via Start Menu → Settings → Ease of Access). It does not matter which theme is chosen. - Open Firefox and view a web page which uses CSS ::selection properties to set a custom selection highlight. For example, https://www.smashingmagazine.com/2019/11/newspapers-teach-web-design
- Select some text, either with the mouse or by using caret navigation (Shift+arrows).
- Observe the selected text.
- Perform the above steps in another browser which supports WHC (Edge, IE11).
- Observe the selected text.
Actual results:
No selection highlight is seen in Firefox.
Selection highlight is seen in other WHC-supporting browsers (Edge, IE11), albeit with the WHC selection colours and not those of the site.
Expected results:
A selection highlight should be visible in Firefox.
Reporter | ||
Comment 1•1 year ago
|
||
Note: the URL visible in the screenshots does not have complete test results. I am waiting access back to my server.
Reporter | ||
Comment 2•1 year ago
|
||
A github bug which described this bug: https://github.com/csstools/sanitize.css/issues/173
Comment 3•1 year ago
|
||
It looks like there's code in widget/windows to detect if High Contrast mode is on. Perhaps we should just be ignoring any CSS-specified ::selection colors in this case -- :Jamie, WDYT?
Assignee | ||
Comment 4•1 year ago
|
||
So, this should be happening already, due to the "ignored_when_colors_disabled" stuff. The issue in that case is that we'd end up with the inherited color, I guess, which is not what we want in this case.
So maybe we need a check for that before computing the ::selection style...
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
This was a follow-up from the backplate stuff which I requested but didn't
happen.
Assignee | ||
Comment 6•1 year ago
|
||
Depends on D53170
Assignee | ||
Updated•1 year ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a60597c2972 Centralize logic to ignore document colors. r=jfkthame
Updated•1 year ago
|
Comment 8•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Updated•1 year ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c09d8b07585 When ignoring document colors, ignore ::selection styles altogether. r=morgan
Comment 10•1 year ago
|
||
Backed out changeset 6c09d8b07585 (bug 1596050) for reftest failures at layout/reftests/high-contrast/selection-001.html
Backout: https://hg.mozilla.org/integration/autoland/rev/13923424c3fc752201e23d13492190b2cec1efcd
Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=6c09d8b075850f2e86995106981c3d45379dc048
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=279136384&repo=autoland&lineNumber=10543
Assignee | ||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eab89fc5733a When ignoring document colors, ignore ::selection styles altogether. r=morgan
Comment 12•1 year ago
|
||
bugherder |
Assignee | ||
Updated•1 year ago
|
Reporter | ||
Comment 13•1 year ago
|
||
chef kiss cheers Emilio/Mozillians
this will really make a difference for a lot of us
Description
•