Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

No focus style for md-radio-group when no button is selected #3643

Closed
calebegg opened this issue Jul 8, 2015 · 2 comments · Fixed by #11564
Closed

No focus style for md-radio-group when no button is selected #3643

calebegg opened this issue Jul 8, 2015 · 2 comments · Fixed by #11564
Labels
a11y This issue is related to accessibility g3: reported The issue was reported by an internal or external product team.
Milestone

Comments

@calebegg
Copy link
Member

calebegg commented Jul 8, 2015

Focus is shown on a radio group with at least one selected item (as an ink ripple around the selected item), but not on a radio group with no selected items. This is contrary to the spec:

https://www.google.com/design/spec/components/selection-controls.html#selection-controls-radio-button

To reproduce:

  1. Go to the radio button demo page
  2. Remove all the radio buttons from the second demo using the "remove" button
  3. Add back some items using the "add" button.
  4. Tab into the radio group and notice that there's no way to tell it's focused.
@ThomasBurleson ThomasBurleson modified the milestone: REVISIT Jul 31, 2015
@ThomasBurleson ThomasBurleson modified the milestones: REVISIT, Backlog Aug 10, 2015
@ThomasBurleson ThomasBurleson modified the milestones: post-1.0 , Backlog Sep 4, 2015
@jelbourn jelbourn added the g3: reported The issue was reported by an internal or external product team. label Sep 14, 2015
@tccBen
Copy link

tccBen commented Sep 29, 2015

I found one way to handle this issue by styling the radio buttons to all highlight with the focus background when none are selected. Behavior is normal once one of the radio buttons is selected.

md-radio-group.md-focused.ng-pristine md-radio-button .md-container:before {
    background-color: '{{background-color}}';
    left:-8px;
    top:-8px;
    right:-8px;
    bottom:-8px;
    }

@ThomasBurleson ThomasBurleson modified the milestones: post-1.0 , Backlog Jan 5, 2016
@ThomasBurleson ThomasBurleson modified the milestones: Backlog, Deprecated Apr 20, 2016
@michahell
Copy link

Elaborating on @tccBen 's answer, here is something that looks similar to how checkboxes are focused in chrome:

md-radio-group.md-focused.ng-pristine md-radio-button:first-child .md-container:before {
	background-color: rgba(0, 0, 0, 0.15);
	left: -8px;
	top: -8px;
	right: -8px;
	bottom: -8px;
}

@Splaktar Splaktar added a11y This issue is related to accessibility and removed needs: UX team review labels Dec 19, 2018
Splaktar added a commit that referenced this issue Dec 19, 2018
better align with the MD spec

Fixes #11563. Fixes #8339. Fixes #3643.
Splaktar added a commit that referenced this issue Dec 20, 2018
better align with the MD spec

Fixes #11563. Fixes #8339. Fixes #3643.
mmalerba pushed a commit that referenced this issue Jan 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility g3: reported The issue was reported by an internal or external product team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants