Skip to content

fix(material-experimental/mdc-radio): strong focus indicator not working #19091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-helpers/_mdc-helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ $mat-typography-level-mappings: (
// the hidden input is focused (slightly different for each control).
.mdc-checkbox__native-control:focus ~ .mat-mdc-focus-indicator::before,
.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before,
.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before,
.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before,

// For all other components, render the focus indicator on focus.
.mat-mdc-focus-indicator:focus::before {
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-radio/radio.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="mdc-radio__inner-circle"></div>
</div>
<div class="mdc-radio__ripple"></div>
<div mat-ripple class="mat-radio-ripple mat-focus-indicator"
<div mat-ripple class="mat-radio-ripple mat-mdc-focus-indicator"
[matRippleTrigger]="formField"
[matRippleDisabled]="_isRippleDisabled()"
[matRippleCentered]="true"
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-radio/radio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ describe('MDC-based MatRadio', () => {
radioNativeElements.map(element => element.querySelector('.mat-radio-ripple')!);

expect(radioRippleNativeElements
.every(element => element.classList.contains('mat-focus-indicator'))).toBe(true);
.every(element => element.classList.contains('mat-mdc-focus-indicator'))).toBe(true);
});

});
Expand Down