Skip to content

bug(dialog): MDC dialog text color fails to pass WCAG AAA contrast tests #26797

@PowerKiKi

Description

@PowerKiKi

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

14

Description

The MDC dialog content has a poor contrast that fails to pass WCAG AAA tests, as seen in screenshot.

In both cases the background is white, #ffffff. Before, in v14, the text was #212121 with a contrast of 16.1:1, according to https://webaim.org/resources/contrastchecker/. After, in v15 with MDC, the new text color is #666666, which clearly has a lower contrast of only 5.74:1.

Screenshot straight from https://v14.material.angular.io/components/dialog/overview and https://rc.material.angular.io/components/dialog/overview:

image

image

Reproduction

See screenshots

Expected Behavior

For such as simple and common use-case, I expect it to pass even the strictest contrast tests, such as WCAG AAA.

Or at the very least, we should have clear instructions on how to properly configure this, in order to pass WCAG AAA.

Actual Behavior

It fails WCAG AAA, and thus is less readable in sub-optimal conditions.

Environment

  • Angular: 15
  • CDK/Material: 15
  • Browser(s): Chrome 111
  • Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions