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

Inconsistent button/dropdown outline #17573

Closed
acshef opened this issue Sep 11, 2015 · 6 comments
Closed

Inconsistent button/dropdown outline #17573

acshef opened this issue Sep 11, 2015 · 6 comments

Comments

@acshef
Copy link

acshef commented Sep 11, 2015

How come regular buttons don't remove the focus outline, but dropdown buttons do? The difference is jarring, especially when using split button dropdowns. (This affects v3 and v4.)
image
image
I'm curious: what's the reason for this design?

@cvrebert
Copy link
Collaborator

Presumably @mdo thinks the focus outline on a dropdown menu button after a dropdown menu is closed either is confusing or looks bad.
See 8bb7def#diff-69b9ec7c8eab7fe0e63a39c7bb88e003R24

@acshef
Copy link
Author

acshef commented Sep 11, 2015

That's a fair design preference, although it's still inconsistent :) Regular buttons retain the focus outline after being clicked. I see that on the dropdown toggle button element, the aria-expanded attribute changes depending on whether the dropdown is expanded or not. Since [attribute=value] is only a CSS Level 2 selector, would it be preferrable to conditionally hide the focus outline based on that?

@patrickhlauke
Copy link
Member

would it be preferrable to conditionally hide the focus outline based on that

could you propose a tweak/show an example of what you mean (a jsfiddle or similar would be great). this is definitely a thorny area that we'd like to address at some point...

@acshef
Copy link
Author

acshef commented Sep 11, 2015

http://jsfiddle.net/k8L0u7os/
I've drummed up some examples, but I'd have to better understand it from @mdo's standpoint. The comment says

Prevent the focus on the dropdown toggle when closing dropdowns

Why is that wanted? When the dropdown is closed, the focus does technically go back to the dropdown button. So why mask it?

@patrickhlauke
Copy link
Member

because designers usually don't like it, is probably the short answer

@mdo
Copy link
Member

mdo commented Dec 7, 2015

because designers usually don't like it, is probably the short answer

There was feedback long ago that it was awkward to emphasize something that was recently closed—in this case our dropdown menus. I'd rather we be consistent though and really like the hidden when open example in that jsfiddle.

@mdo mdo added this to the v4.0.0-alpha.6 milestone Nov 27, 2016
@mdo mdo modified the milestones: v4.0.0-alpha.6, v4.0.0-beta Jan 4, 2017
@mdo mdo added the has-pr label Feb 13, 2017
mdo added a commit that referenced this issue Feb 13, 2017
@mdo mdo mentioned this issue Feb 13, 2017
mdo added a commit that referenced this issue Mar 13, 2017
@mdo mdo mentioned this issue Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants