Skip to content

support high contrast mode detection #424

@wkeese

Description

@wkeese

Most widgets don't need special code to support high-contrast mode, because when the user sets the OS to high-contrast mode, the browser automatically changes text color and font-size according to the OS's setting.

However, deliteful/ProgressIndicator is an exception because it uses SVG, and the browser does not adjust the colors within SVG DOM.

Therefore, add high-contrast detection code to delite, similar to dojo core's hccss.js.

Some possible debate points about this PR:

  • should it set the CSS class on <body>, or just define has("highcontrast")?
  • relatedly, should the code be in a separate hc.js module, or rolled into features.js?

See also ibm-js/deliteful#585.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions