Skip to content

fix(radio): missing focus indication in high contrast mode #13280

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

Closed

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 23, 2018

Currently we use ripples for focus indication on radio buttons, however they're hidden in high contrast mode. These changes add an outline as a fallback.

Also fixes the focus indication showing up for mouse focus.

@crisbeto crisbeto added Accessibility This issue is related to accessibility (a11y) target: patch This PR is targeted for the next patch release labels Sep 23, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 23, 2018
// how IE/Edge treat native radio buttons in high contrast mode. We can't turn the border
// into a dotted one, because it's too thick which causes the circles to look off.
@include cdk-high-contrast {
.mat-radio-button.cdk-focused & {
Copy link
Member

@devversion devversion Sep 23, 2018

Choose a reason for hiding this comment

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

I remember we had to use cdk-keyboard-focused because clicking on the <label> causes the focus origin to be program.

Isn't this the case here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure. I went with .cdk-focused, because it's what we use for the other focus styling.

@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch from 4ed68d4 to 9facbda Compare September 23, 2018 20:02
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Sep 23, 2018
@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch from 9facbda to 7b1c079 Compare September 23, 2018 21:25
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch from 7b1c079 to 8185145 Compare December 9, 2018 09:51
@ngbot
Copy link

ngbot bot commented Dec 11, 2018

Hi @crisbeto! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

1 similar comment
@ngbot
Copy link

ngbot bot commented Dec 11, 2018

Hi @crisbeto! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch 2 times, most recently from 4b493bc to eddc2ed Compare December 13, 2018 17:44
@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch from eddc2ed to 7af9fc0 Compare December 28, 2018 15:53
@crisbeto crisbeto changed the title fix(radio): missing radio indication in high contrast mode fix(radio): missing focus indication in high contrast mode Mar 3, 2019
@mmalerba mmalerba added aaa and removed aaa labels Apr 25, 2019
@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch from 7af9fc0 to bb16662 Compare June 10, 2019 19:48
@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch from bb16662 to 6da0133 Compare December 29, 2019 18:32
@crisbeto crisbeto added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jan 5, 2020
crisbeto added a commit to crisbeto/material2 that referenced this pull request Apr 1, 2020
…trast mode

Along the same lines as angular#13280, but for the MDC component. Adds an outline around the circle when focused in high contrast mode.
Currently we use ripples for focus indication on radio buttons, however they're hidden in high contrast mode. These changes add an outline as a fallback.

Also fixes the focus indication showing up for mouse focus.
@crisbeto crisbeto force-pushed the radio-high-contrast-focus-indication branch from 6da0133 to e781075 Compare April 1, 2020 21:03
mmalerba pushed a commit that referenced this pull request Apr 6, 2020
Along the same lines as #13280, but for the MDC component. Adds an outline around the circle when focused in high contrast mode.
mmalerba pushed a commit that referenced this pull request Apr 14, 2020
Along the same lines as #13280, but for the MDC component. Adds an outline around the circle when focused in high contrast mode.
@crisbeto
Copy link
Member Author

crisbeto commented Mar 8, 2021

Closing in favor of #22145.

@crisbeto crisbeto closed this Mar 8, 2021
@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 8, 2021
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 P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants