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

[Checkbox] - receive focus after click #2610

Closed
avalanche1 opened this issue Jul 13, 2015 · 6 comments
Closed

[Checkbox] - receive focus after click #2610

avalanche1 opened this issue Jul 13, 2015 · 6 comments

Comments

@avalanche1
Copy link
Member

By default, html checkboxes receive focus after being clicked, while SUI checkboxes do not.
I think they should. This is good UX for users (like me) who use kb+mouse for navigation. Like, I can tab to the next control easily, not having to tab through all of the controls from beginning of the page.

@Illyism
Copy link
Contributor

Illyism commented Jul 13, 2015

I agree, this would replicate the standard feature of a HTML checkbox input.

@jlukic
Copy link
Member

jlukic commented Jul 13, 2015

I think there are arguments on both sides.

See #2567, or check stack overflow issues opened about bootstrap button focus. Adding focus on click is an accessibility feature that often confuses users because it seems like the 'activated' or 'down' state of the element is stuck on.

@avalanche1
Copy link
Member Author

Well, they are nagging about buttons, not checkboxes)
And there's a big conceptual diff bw btn and chkbx: after clicking a btn you usually submit your input, but after clickin chkbox, you keep filling out the form - thus you need the ability of further navigation inside that form.

@Illyism
Copy link
Contributor

Illyism commented Jul 15, 2015

Yeah, Semantic would benefit quite well in having some more accessibility thrown in.

Here's an example of how it works using the user agent stylesheet: http://codepen.io/Illyism/pen/WvyJpR

  1. Click on Five
  2. Shift+tab to go to Four
  3. Space to check the current box
  4. Tab to go back to Five
  5. Click anywhere to lose focus
  6. Tab to start focusing from the first focusable element
  7. Click anywhere to lose focus
  8. Shift+tab to start focusing from the last focusable element

@jlukic
Copy link
Member

jlukic commented Jul 17, 2015

Example from next with fixed checkbox focus
http://jsfiddle.net/65rgdhdo/

@avalanche1
Copy link
Member Author

👍

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

3 participants