components icon indicating copy to clipboard operation
components copied to clipboard

bug(material/chips): Focus state for input chips has insufficient text contrast

Open zarend opened this issue 11 months ago • 2 comments

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

No response

Description

Focus states for input chips have insufficient contrast.

Screenshot 2023-07-24 at 4 10 58 PM Screenshot 2023-07-24 at 4 13 01 PM

Reproduction

Steps to reproduce:

  1. Navigate to Chips with input demo on https://material.angular.io/components/chips/overview#chips-autocomplete
  2. ("Favorite Fruits" appears with "lemon", "lime", "etc")
  3. Tab into the "Favorite Fruits" input

Expected Behavior

"Favor Fruits" input is focused and cursor appears. Contrast ratio of label expected to be 4.5:1 or highter

Actual Behavior

Cursor appears to be focus, but label contrast ratio is 3.92:1. See screenshots.

Environment

N/A

zarend avatar Jul 24 '23 23:07 zarend

Action item is to set opacity to 0 on the .mat-mdc-form-field-focus-overlay for input chips. That will make the text easier to read and align closer to Material Design specification.

zarend avatar Jul 24 '23 23:07 zarend

image

As of version 17.3.1 mat-label is passing color contrast requirements

DBowen33 avatar Apr 15 '24 18:04 DBowen33