Skip to content

Commit e779e41

Browse files
committed
Revert "fix(radio): host element unable to receive focus events" (#14468)
* Revert "Revert "fix(a11y): activeItem out of date if active index is removed from ListKeyManager" (#14467)" This reverts commit 8f790f5. * Revert "build: update sauce connect (#14422)" This reverts commit bc563b7. * Revert "build: changelog script not filtering duplicate entries (#14421)" This reverts commit fe46290. * Revert "build: update to angular 7.1.2 (#14418)" This reverts commit e1487df. * Revert "refactor(drag-drop): move logic out of directives (#14350)" This reverts commit 19f9bca. * Revert "fix(checkbox): redirect focus to underlying input element (#13959)" This reverts commit e0eb3df. * Revert "fix(radio): host element unable to receive focus events (#13956)" This reverts commit 41eb27e.
1 parent c88c37a commit e779e41

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/lib/radio/radio.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ $mat-radio-ripple-radius: 20px;
1010
.mat-radio-button {
1111
display: inline-block;
1212
-webkit-tap-highlight-color: transparent;
13-
outline: 0;
1413
}
1514

1615
// Inner label container, wrapping entire element.
@@ -142,7 +141,7 @@ $mat-radio-ripple-radius: 20px;
142141
opacity: 0.04;
143142
}
144143

145-
.mat-radio-button:not(.mat-radio-disabled).cdk-focused & {
144+
.mat-radio-button.cdk-focused & {
146145
opacity: 0.12;
147146
}
148147

src/lib/radio/radio.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ describe('MatRadio', () => {
723723
const radioButtonEl =
724724
predefinedFixture.debugElement.query(By.css('.mat-radio-button')).nativeElement;
725725

726-
expect(radioButtonEl.getAttribute('tabindex')).toBe('-1');
726+
expect(radioButtonEl.getAttribute('tabindex')).toBeFalsy();
727727
});
728728

729729
});

src/lib/radio/radio.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,7 @@ export const _MatRadioButtonMixinBase:
336336
'[class.mat-radio-checked]': 'checked',
337337
'[class.mat-radio-disabled]': 'disabled',
338338
'[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
339-
// Needs to be -1 so the `focus` event still fires.
340-
'[attr.tabindex]': '-1',
339+
'[attr.tabindex]': 'null',
341340
'[attr.id]': 'id',
342341
// Note: under normal conditions focus shouldn't land on this element, however it may be
343342
// programmatically set, for example inside of a focus trap, in this case we want to forward

0 commit comments

Comments
 (0)