Skip to content

bug(Material Checkbox): focused styles works only for keyboard-focused checkboxes #18912

Closed
@platon-rov

Description

@platon-rov

Reproduction

https://stackblitz.com/edit/components-issue-zyqjwi

Steps to reproduce:

  1. Place Material Checkbox after Material Menu Trigger button. (Maybe exist more scenarios)
  2. Tab out from menu

Expected Behavior

Material Checkbox focused and has focused styles.

Actual Behavior

Material Checkbox focused but but does not have any focused styles.

Current behavior based on the next rule from src/material/checkbox/checkbox.scss:

.mat-checkbox.cdk-keyboard-focused & {
    opacity: 0.12;
}

Environment

  • Angular: 9.1.0-next.4
  • CDK/Material: 9.1.3
  • Browser(s): It does not matter
  • Operating System (e.g. Windows, macOS, Ubuntu): It does not matter

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/a11yarea: material/checkbox

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions