Skip to content

Commit

Permalink
Revert "fix(radio): host element unable to receive focus events" (#14468
Browse files Browse the repository at this point in the history
)

* 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.
  • Loading branch information
mmalerba committed Dec 11, 2018
1 parent 8f790f5 commit 4aa47c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/lib/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ $mat-radio-ripple-radius: 20px;
.mat-radio-button {
display: inline-block;
-webkit-tap-highlight-color: transparent;
outline: 0;
}

// Inner label container, wrapping entire element.
Expand Down Expand Up @@ -142,7 +141,7 @@ $mat-radio-ripple-radius: 20px;
opacity: 0.04;
}

.mat-radio-button:not(.mat-radio-disabled).cdk-focused & {
.mat-radio-button.cdk-focused & {
opacity: 0.12;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/radio/radio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ describe('MatRadio', () => {
const radioButtonEl =
predefinedFixture.debugElement.query(By.css('.mat-radio-button')).nativeElement;

expect(radioButtonEl.getAttribute('tabindex')).toBe('-1');
expect(radioButtonEl.getAttribute('tabindex')).toBeFalsy();
});

});
Expand Down
3 changes: 1 addition & 2 deletions src/lib/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,7 @@ export const _MatRadioButtonMixinBase:
'[class.mat-radio-checked]': 'checked',
'[class.mat-radio-disabled]': 'disabled',
'[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
// Needs to be -1 so the `focus` event still fires.
'[attr.tabindex]': '-1',
'[attr.tabindex]': 'null',
'[attr.id]': 'id',
// Note: under normal conditions focus shouldn't land on this element, however it may be
// programmatically set, for example inside of a focus trap, in this case we want to forward
Expand Down

0 comments on commit 4aa47c7

Please sign in to comment.