Firefox should no longer remove background images in Windows high contrast mode

NEW
Unassigned

Status

()

Core
Layout
--
enhancement
2 years ago
5 months ago

People

(Reporter: Shawn Lauriat, Unassigned)

Tracking

(Blocks: 1 bug, {access})

Trunk
access
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [parity-blink parity-edge])

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36

Steps to reproduce:

In Windows settings, set the theme to high contrast. In this mode, IE and Firefox both remove background images from web page rendering.


Actual results:

Edge will no longer remove background images in high contrast mode, instead adding background color to text rendered over background images in order to preserve the readability of high contrast text. See https://blogs.windows.com/msedgedev/2016/04/20/building-a-more-accessible-web-platform/

Firefox in Windows will become the only supported browser which removes background images in high contrast mode.


Expected results:

Firefox should match other browsers and platforms in not removing background images in high contrast mode.
(Reporter)

Updated

2 years ago
Severity: normal → enhancement

Updated

2 years ago
Component: Untriaged → Disability Access APIs
Product: Firefox → Core
This is actually a themeing bug more than an accessibility APIs one. The latter are for exposure of web site info to assistive technologies.
Component: Disability Access APIs → Theme
Product: Core → Firefox
Gijs, any idea who could work on this?
Flags: needinfo?(gijskruitbosch+bugs)
Whiteboard: [parity-blink parity-edge]

Comment 3

2 years ago
(In reply to Marco Zehe (:MarcoZ) from comment #2)
> Gijs, any idea who could work on this?

Someone from core / layout. Maybe :overholt can help find somebody.
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(overholt)

Updated

2 years ago
Component: Theme → Untriaged
Product: Firefox → Core
Fixing this would fix a range of issues we (and our users!) have had to deal with over the years (AKA punishment for following Windows HCM spec). I'm not sure exactly where this code is, but layout sounds right.

DBaron do you know where in the code a fix would go?
Blocks: 343205
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout
Ever confirmed: true
Flags: needinfo?(overholt) → needinfo?(dbaron)
Keywords: access
So when high contrast mode is enabled, nsPresContext::GetDocumentColorPreferences sets useAccessibilityTheme from the result of LookAndFeel::GetInt, and in turn (at the bottom of the function) sets mUseDocumentColors based on useAccessibilityTheme:
https://hg.mozilla.org/mozilla-central/file/1152d99d8c53/layout/base/nsPresContext.cpp#l489

This in turn affects the result of nsPresContext::UseDocumentColors, which is used by the function MapSinglePropertyInto in nsCSSDataBlock.cpp (along with the ShouldIgnoreColors helper function) to ignore author declarations of properties that have the flag CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED (set in nsCSSPropList.h).


The question here is whether we want to change what we do for the use_document_colors preference, or only change the behavior when this behavior is implicitly triggered from high-contrast mode and not when the pref is set explicitly.  (We also could have two different values of the preference that differ as to whether they ignore background images.)
Flags: needinfo?(dbaron)
That said, implementing this behavior:

(In reply to Shawn Lauriat from comment #0)
> Edge will no longer remove background images in high contrast mode, instead
> adding background color to text rendered over background images in order to
> preserve the readability of high contrast text. See
> https://blogs.windows.com/msedgedev/2016/04/20/building-a-more-accessible-
> web-platform/

is additional, substantial, work.
(Substantial in the sense that in order for me to tell you how it should be implemented, I'd need a much more detailed description of what the behavior actually *is*.)

Updated

7 months ago
See Also: → bug 1387344

Updated

7 months ago
See Also: → bug 1022553

Updated

7 months ago
See Also: → bug 957988
You need to log in before you can comment on or make changes to this bug.