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

Disabled radio buttons do not indicate selection #27814

Closed
kleinph opened this issue Dec 11, 2018 · 10 comments
Closed

Disabled radio buttons do not indicate selection #27814

kleinph opened this issue Dec 11, 2018 · 10 comments
Labels

Comments

@kleinph
Copy link

kleinph commented Dec 11, 2018

A disabled radio button group does not indicate the (pre)selcted value as other form fields do. I am not sure if this is intended behavior, but native radio buttons do show their state when disabled.

@ysds
Copy link
Member

ysds commented Dec 12, 2018

x-ref: #23544 ?

@kleinph
Copy link
Author

kleinph commented Dec 13, 2018

@ysds as far as I understand, the referenced PR was to fix a problem where the active state could be triggered on an inactive button. In my issue the button should indicate its preset state also when disabled analogous to native radio buttons.

@ysds
Copy link
Member

ysds commented Dec 14, 2018

OK, I understand. Probably, that is a styling issue of buttons.

2018-12-14 23 31 37

Demo: https://codepen.io/anon/pen/BvKaqz
Latest: https://codepen.io/anon/pen/LMNYKK

@kleinph I recommend you to change the issue title for clarification.

@tmorehouse
Copy link
Contributor

I'm wondering if disabled elements should just have a reduced opacity for simplicity in styling?

@kleinph
Copy link
Author

kleinph commented Dec 15, 2018

@ysds sure, how should I name it?
BTW your demo makes it pretty clear what my issue is. Thanks!

@tmorehouse
Copy link
Contributor

Maybe active+disabled should just be mentioned as incompatible/not-supported for button mode?

@mdo
Copy link
Member

mdo commented Dec 18, 2018

Well, .active:disabled seems logical and useful—a button is selected and it's processing/loading, for example. :active:disabled isn't useful though because disabled shouldn't be interactive. Perhaps the problem is coming from us conflating those two vs separating the .active from :active?

@tmorehouse
Copy link
Contributor

In the above examples it would really be :checked:disabled, rather than active:disabled (button style checkboxes)

@ysds
Copy link
Member

ysds commented Dec 19, 2018

I agree separating those two state:

  • Pressed (:active)
  • Selected (:checked, aria-pressed, aria-selected, aria-current) - .active class

@mdo
Copy link
Member

mdo commented Apr 13, 2022

Closing as stale for v4. We'll be moving onto focus entirely on v5 and v4 will only see critical updates.

@mdo mdo closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants