Skip to content

High contrast focus indicators conflict with strong focus indicators #24097

Closed
@zelliott

Description

@zelliott

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

Unsure - will have to look - but I'm fairly certain this is a regression.

Description

I noticed that dedicated focus indicators for Windows HCM have been added to various components (#22145, #22889). Unfortunately, these HCM focus indicators conflict with the existing system-wide strong focus indicators if the user has opted into strong focus indicators. By "conflict", I mean multiple focus indicators render where only one should render.

For example, in the screenshot below, two focus indicators render on a radio button when in HCM with strong focus indicators opted-in.

image

I'm not sure yet how many components this bug affects, but I wanted to file this sooner rather than later so that we didn't merge in some pending PRs (#22889) until a fix was identified.

Reproduction

I'd share a Stackblitz link, but Stackblitz is being buggy at the moment and so repro steps are a bit more involved.

Steps to reproduce:

  1. Go to material.angular.io/components/checkbox/examples on a Windows PC.
  2. Open the first example in Stackblitz.
  3. Add the mat.strong-focus-indicators styles to the theme.scss file:
@include mat.strong-focus-indicators();
@include mat.strong-focus-indicators-theme($theme);
  1. Turn on HCM.
  2. Refresh the Stackblitz.
  3. Focus the first checkbox in the Stackblitz demo.
  4. Observe the double focus indicator on the checkbox.

Expected Behavior

One focus indicator should be present on the checkbox.

Actual Behavior

Two focus indicators were present on the checkbox.

Environment

  • Angular: Latest
  • CDK/Material: Latest
  • Browser(s): All
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

AccessibilityThis issue is related to accessibility (a11y)GThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions