Closed Bug 1266172 Opened 8 years ago Closed 4 years ago

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

Categories

(Core :: Layout, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: slauriat, Unassigned)

References

Details

(Keywords: access, parity-chrome, parity-edge)

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.
Severity: normal → enhancement
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]
(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)
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: themea11y
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*.)
See Also: → 1387344
See Also: → 1022553
See Also: → 957988
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [parity-blink parity-edge] → []
Whiteboard: []

I think this depends on us getting the readability backplate work from bug 1539212

Depends on: 1539212

:asa should this be closed?

Flags: needinfo?(asa)

Yes. This is done! Fixed at bug 1539212.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(asa)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.