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

Carousel slider gets dotted border #10147

Closed
jeroen opened this issue Aug 25, 2013 · 7 comments
Closed

Carousel slider gets dotted border #10147

jeroen opened this issue Aug 25, 2013 · 7 comments

Comments

@jeroen
Copy link

jeroen commented Aug 25, 2013

A minor annoyance in the carousel plugin:

After clicking on one of the side bars, it gets a dotted border in firefox and IE. Probably missing an event.preventDefault() somewhere. http://www.youtube.com/watch?v=vNHu8-1vOGM

@cvrebert
Copy link
Collaborator

This is most likely the browser's own focus styling.

@jeroen
Copy link
Author

jeroen commented Aug 26, 2013

Yes, perhaps a $(this).blur() in the click event handler will do.

@mycueb
Copy link

mycueb commented Aug 26, 2013

a:focus {outline:thin dotted #333;} is applied. Fix: Just add {outline:none !important} to the already defined .carousel-control:focus

@mdo mdo closed this as completed in d654f90 Nov 28, 2013
@mdo mdo mentioned this issue Nov 28, 2013
@rahularady
Copy link

@Heydon
Copy link

Heydon commented Apr 4, 2014

This should be reopened.

It's understandable to find the dotted outline ugly, but it does serve a purpose: It indicates to keyboard users -- navigating by TAB key -- which item is currently available to be pressed. Without a :focus indicator, their UX is screwed.

Using the blur() function to unfocus the control is not a good idea, since the control should be "in hand" for keyboard users in this situation.

If you are unhappy with the outline focus style, I recommend replacing it with something else

:focus {
/* anything you would be happy to see with :hover */
}

@sturobson
Copy link

+1'ing @Heydon here. I'm sure just doing

:hover,
:focus {
/* anything you would be happy to see with :hover */
}
would suffice on most things.

If it doesn't work, create something else. I suggest -

a) put what you've pulled out back in so designers/developers make it work for their designs
b) add the :focus where you've got :hover

stripping it out because of 'the look' of it smarts of developer laziness.

@patrickhlauke
Copy link
Member

ok, looking at the current state of the carousel http://getbootstrap.com/javascript/#carousel it does seem that there IS a visual indication of focus (minus the outline). we can now argue about whether that indication is STRONG enough or not, but at least it's not a complete removal. rather than reopening this bug, i'd suggest - if you feel strongly about it - submitting an alternative stronger styling as a discrete improvement patch / pull request

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

7 participants