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

There is no focus highlighting for buttons in active state #12154

Closed
jobara opened this issue Jan 8, 2014 · 15 comments
Closed

There is no focus highlighting for buttons in active state #12154

jobara opened this issue Jan 8, 2014 · 15 comments

Comments

@jobara
Copy link

jobara commented Jan 8, 2014

When buttons have the active class applied (.active), there is no focus highlighting on the button. This makes it hard to 1) know that you can deactivate a button and 2) for keyboard only users to know where they are. When a button is active it should still receive focus highlighting when the button is focused by either the mouse or keyboard.

Step 1:
Go to the demo: http://getbootstrap.com/css/#buttons-active

Step 2:
Using the mouse or the keyboard put focus on any of the active buttons.
Note that you cannot tell which one is focused.

Tested on:
Safari, Chrome, Firefox (Mac OS 10.9.1)
IE 11, Chrome, Firefox (Windows 8.1)

@deviprsd
Copy link

deviprsd commented Jan 8, 2014

What are you suggesting exactly ?

@jobara
Copy link
Author

jobara commented Jan 8, 2014

Sorry, I've updated the ticket. Hopefully it is clearer now. In short it should still get focus highlighting even when the .active class is applied.

@deviprsd
Copy link

deviprsd commented Jan 8, 2014

Maybe ... its not a big issue

@jobara
Copy link
Author

jobara commented Jan 8, 2014

It's probably less of an issue for the case of the :active pseudo selector. However, for the .active class it is. I'd want to use it for a toggle button, but now it posses both a usability and an accessibility issue for the reasons I stated above.

@cvrebert
Copy link
Collaborator

cvrebert commented Jan 8, 2014

We apparently remove the focus outline for active stuff:

.btn:active,
.btn.active {
  background-image: none;
  outline: 0;
}

and since this comes after the :focus stuff in the CSS, it dominates over the .btn:focus styles.

@zlatanvasovic
Copy link
Contributor

@cvrebert Why is background-image: none there?

@cvrebert
Copy link
Collaborator

@zdroid Most likely related to the Android Firefox fix. Not sure.

@zlatanvasovic
Copy link
Contributor

Hmm.

@zlatanvasovic
Copy link
Contributor

@cvrebert No need for it on active. Look at this weird test case. My phone tells me the second button don't need background-image reset on hover (mobile devices don't have it), focus or active.

Extended version: it's caused by CSS overriding. When you add something new to styles, it overrides default styles for all states, except when state styles are set differently. 😄

@mdo
Copy link
Member

mdo commented Jan 12, 2014

The background-image: none was for removing the gradient on buttons in previous versions.

@zlatanvasovic
Copy link
Contributor

It removes gradient for :active also. No need for repeating.

2014/1/12 Mark Otto notifications@github.com

The background-image: none was for removing the gradient on buttons in
previous versions.


Reply to this email directly or view it on GitHubhttps://github.com//issues/12154#issuecomment-32130254
.

Zlatan Vasović - ZDroid

@zlatanvasovic
Copy link
Contributor

Chris, look at comment on your commit. Your curly brace is on new line.

2014-02-09 2:00 GMT+01:00 Chris Rebert notifications@github.com:

Closed #12154 #12154 via 4787a694787a69
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/12154
.

Zlatan Vasović - ZDroid

@mdo
Copy link
Member

mdo commented Feb 9, 2014

I fixed that @zdroid, in 65b1070.

@zlatanvasovic
Copy link
Contributor

Thanks.

2014-02-09 10:18 GMT+01:00 Mark Otto notifications@github.com:

I fixed that @zdroid https://github.com/ZDroid, in 65b107065b1070
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/12154#issuecomment-34569269
.

Zlatan Vasović - ZDroid

@jobara
Copy link
Author

jobara commented Feb 10, 2014

@cvrebert thanks for fixing this.

stempler pushed a commit to stempler/bootstrap that referenced this issue Apr 11, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
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

5 participants