Accessibility/ColorFilters

From MozillaWiki
Jump to: navigation, search

What is this?

Color filters are a way for users with visual impairments to adjust the browser's contents in order to enhance perception. Users who have a system high contrast theme enabled will be offered this feature. We will also expose a WebExtension API that will allow extension authors to experiment with this functionality and offer more ways to use this functionality.

This is how mozilla.org can be viewed with different color filters

Background

Currently, Firefox has a "high contrast" mode that is enabled if the Windows high contrast theme is used. In this mode, web content is displayed with background images removed and a high contrast ratio for text and background (eg. white/black or black/white or yellow/black). This works well for simple documents breaks quickly with more modern pages with heavy visuals.

Chrome has chosen to support "high contrast" differently: when the theme is detected, they suggest that the user install the "High Contrast" extension from the chrome store. The extension offers color filtering described above. It is implemented as CSS filters that are applied to the entire viewport. The graphics performance is degraded when a filter is used, in addition certain workarounds needed to be implemented in the plugin to achieve the desired effect.

The goal of this project is to offer users a feature that is automatically available, easy to use, configurable, and performant.

Links


Tasks

There are multiple moving parts to get this done spanning multiple modules. The table below is for tracking this.

Module/Team Task Status Bug
WebRender Add a generic color transformation matrix filter type Merged Issue #2297
DOM Add a chrome-only JS API for setting the docshell's color transformation matrix Landed bug 1431466
WebExtensions Propose and implement a WebExtensions tab API for setting a color transformation matrix Proposed API bug 1431473
Strategy & Insights Plan a shield study with UX research and propose it to S&I team
Firefox Propose color filters as a core feature