Thanks to visit codestin.com
Credit goes to github.com

Skip to content

USWDS - Bug: Disabled color settings do not check for contrast #5427

@amyleadem

Description

@amyleadem

Summary

When customizing the disabled state color settings, the system does not send a warning when the selected colors do not meet required contrast ratios.

For example, the following configuration results in text that does not meet color contrast requirements with its background :

@use "uswds-core" with (
  $theme-show-notifications: false,
  $theme-color-disabled-lighter: "gray-20",
  $theme-color-disabled-light: "gray-20",
  $theme-color-disabled: "gray-20",
  $theme-color-disabled-dark: "gray-20",
  $theme-color-disabled-darker: "gray-20",
);

Here is a screenshot of the resulting display (note that the text is not visible in the button and select components and that the outline button does not meet contrast requirements):
image

In contrast, here is what it looks like in the default configuration:
image

Expected behavior

The system should send a warning when settings values do not result in the required color contrast ratio.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions