Skip to content

Conversation

maxim-marchenko-bp
Copy link

…checkbox

Fixes the issue in Angular Material 'checkbox' component where classes related to focusing mechanism weren't applied. Related to missing FocusMonitor usage which is being used in other components.

…checkbox

Fixes the issue in Angular Material 'checkbox' component where classes related to focusing mechanism weren't applied.
Related to missing FocusMonitor usage which is being used in other components.
@maxim-marchenko-bp maxim-marchenko-bp requested a review from a team as a code owner August 24, 2024 13:18
@maxim-marchenko-bp maxim-marchenko-bp requested review from mmalerba and andrewseguin and removed request for a team August 24, 2024 13:18
@crisbeto
Copy link
Member

The focus monitor is an internal implementation detail, it's not meant to be applied to all of the components.

@maxim-marchenko-bp
Copy link
Author

maxim-marchenko-bp commented Aug 24, 2024

@crisbeto I've faced this when tried using the, for example cdk-keyboard-fosed class, but it's missing for this component. I need to perform specific things depending on focusing mechanism, and found that it's applied for button, radio-button, but no the checkbox. Is there a reason that this was cut for this component, and I should find a workaround on my app?

@crisbeto
Copy link
Member

We introduced the focus monitor a long time ago when the only way to target focus was :focus. These days :focus-visible should provide similar functionality (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible). I don't feel too strongly about this, but we just never treated the focus monitor classes as a public API. cc @andrewseguin

@mmalerba mmalerba removed their request for review February 19, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants