Skip to content
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

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

Merged
merged 2 commits into from Mar 5, 2020

Conversation

zelliott
Copy link
Collaborator

@zelliott zelliott commented Mar 4, 2020

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
Copy link
Contributor

@mmalerba mmalerba left a comment

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
Copy link
Contributor

mmalerba commented Mar 5, 2020

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

@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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants