Skip to content

fix(radio): Move .mat-radio-input above .mat-focus-indicator. - #18709

Merged
mmalerba merged 2 commits into
angular:masterfrom
zelliott:radio
Mar 5, 2020
Merged

mmalerba merged 2 commits into
angular:masterfrom
zelliott:radio

Conversation

@zelliott

@zelliott zelliott commented Mar 4, 2020 •

Copy link
Copy Markdown
Contributor

The reason why we want to do this is so that we can apply styles to .mat-focus-indicator based upon whether or not .mat-radio-input is focused. We can't do this right now, because we there is no way to "look backwards" with CSS selectors. After this change, we will be able to write:

.mat-radio-input:focus ~ .mat-focus-indicator

This change also aligns the DOM structure of radio button with checkbox and slide toggle (the two latter components already have their inputs before the focus indicator element in the DOM).

Ran TGP, no failures.

can apply styles to .mat-focus-indicator with CSS based upon whether or
not .mat-radio-input is focused.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 4, 2020
@zelliott
zelliott marked this pull request as ready for review March 5, 2020 00:59

@mmalerba mmalerba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Mar 5, 2020
@mmalerba

mmalerba commented Mar 5, 2020

Copy link
Copy Markdown
Contributor

Marking as merge safe since Zack already ran a TGP for this PR

Comment thread src/material/radio/radio.html Resolved
@zelliott
zelliott requested a review from jelbourn March 5, 2020 17:54
@mmalerba
mmalerba merged commit 8c51dda into angular:master Mar 5, 2020
mmalerba added a commit that referenced this pull request Mar 6, 2020
* fix(radio): Move .mat-radio-input above .mat-focus-indicator so that we
can apply styles to .mat-focus-indicator with CSS based upon whether or
not .mat-radio-input is focused.

* Explicitly add comment explaining why ripple must come after input.
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Apr 5, 2020
@jelbourn jelbourn added the Accessibility This issue is related to accessibility (a11y) label Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release

4 participants